9 lines
251 B
Python
9 lines
251 B
Python
# Question: Write a Python program to check if a number is positive, negative, or zero.
|
|
|
|
num = float(input("Enter a number: "))
|
|
if num > 0:
|
|
print(f"{num} is positive")
|
|
elif num < 0:
|
|
print(f"{num} is negative")
|
|
else:
|
|
print(f"{num} is zero") |