step to use if statement:
x = int(input("Enter your integer number: "))
if x < 0:
print ("It is negative")
else:
print ("It is non-negative")
SAVE AND RUN.
REMEMBER: If and Else should be at the same "indentation level".
it will give error if you write:
if blah blah
else blah blah
if statement in python 3.
Posted by
SmoothWayToWorldofPsycho
on Saturday, February 26, 2011
Labels:
programming,
python
0 comments:
Post a Comment