Skip to content

Commit f429b84

Browse files
authored
Create check if a number positive , negative or zero
to find out number are positive , zero or negative
1 parent 8682a38 commit f429b84

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
num = float(input("Enter a number: "))
2+
if num > 0:
3+
print("Positive number")
4+
elif num == 0:
5+
print("Zero")
6+
else:
7+
print("Negative number")
8+
num = float(input("Enter a number: "))
9+
if num >= 0:
10+
if num == 0:
11+
print("Zero")
12+
else:
13+
print("Positive number")
14+
else:
15+
print("Negative number")
16+

0 commit comments

Comments
 (0)