Situatie
num = float(input(“Enter a number: “))
if num > 0:
print(“Positive number”)
elif num == 0:
print(“Zero”)
else:
print(“Negative number”)
Solutie
Output 1
Enter a number: 1
Positive number
Output 2
Enter a number: -1
Negative number
Output 3
Enter a number: 0
Zero
Leave A Comment?