0 votes
164 views
in Python by (98.9k points)
edited
Python Program to Check if a Number is Positive, Negative or 0

1 Answer

0 votes
by (98.9k points)
selected by
 
Best answer
num = float(input("Enter a number: "))
if num > 0:
   print("Positive number")
elif num == 0:
   print("Zero")
else:
   print("Negative number")

 

Related questions

0 votes
1 answer 152 views
asked Jun 11, 2022 in Python by Doubtly (98.9k points)
0 votes
1 answer 129 views
0 votes
1 answer 146 views
0 votes
1 answer 98 views
asked Jun 11, 2022 in Python by Doubtly (98.9k points)
0 votes
1 answer 95 views
asked Jun 11, 2022 in Python by Doubtly (98.9k points)
+1 vote
1 answer 226 views

Doubtly is an online community for engineering students, offering:

  • Free viva questions PDFs
  • Previous year question papers (PYQs)
  • Academic doubt solutions
  • Expert-guided solutions

Get the pro version for free by logging in!

5.7k questions

5.1k answers

108 comments

535 users

...