Skip to content

Commit

Permalink
Create check if a number positive , negative or zero
Browse files Browse the repository at this point in the history
to find out number are  positive , zero or negative
  • Loading branch information
akhilesh147 authored Oct 18, 2020
1 parent 8682a38 commit f429b84
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions check if a number positive , negative or zero
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
num = float(input("Enter a number: "))
if num > 0:
print("Positive number")
elif num == 0:
print("Zero")
else:
print("Negative number")
num = float(input("Enter a number: "))
if num >= 0:
if num == 0:
print("Zero")
else:
print("Positive number")
else:
print("Negative number")

0 comments on commit f429b84

Please sign in to comment.