Write an algorithm on:
Take a number as input from user and print out whether the number is zero, positive or negative.
Answer the question if you can write all the steps properly.
Answers
Answered by
61
Python Program :
a = float(input("Enter a number :"))
if a < 0 :
print("Entered number is a negative number.")
elfi a = 0 :
print("Entered number is zero.")
else :
print ("Entered number is a positive number.")
Output :
Enter a number : 8
Entered number is a positive number.
RESTART
Enter a number : 0
Entered number is zero.
RESTART
Enter a number : -6
Entered number is a negative number.
Similar questions