Sunday 27 October 2019

Python program to check whether given number is positive or not.

Python program to check whether given number is positive or not.

number = int(input("Enter your number:"))

if number > 0:
    print ("It's positive number")
print("It's end of program")

Output of Program

Enter your time:5
It's end of program


Note: If entered number is negative or zero then this program will print only "It's end of program" message.

No comments:

Post a Comment