F How to check a number positive or not in Python? | CodeTheta

How to check a number positive or not in Python?

June 11, 2018

Code: 
num = int(input("Enter a number to check: :"))
if num > 0:
    print("You have entered positive number")
elif num == 0:
    print("You have entered zero(0)")
else:
    print ("You have entered negative number")
             
Output :
Enter a number to check: :-6
You have entered negative number

IDE Used To Test This Code : Python IDLE.

Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.

Post a Comment

PRODUCTS

LISTS OF PRODUCTS

SERVICES

SKILLS
SOFTWARE DEVELOPMENT
WEBSITE DEVELOPMENT
WEB HOSTING
BULK SMS SERVICE
SEO SERVICE
ANDROID APPS
QR CODE / BARCODE
HARDWARE SERVICE
OUR WORK AREA