elif demo : If « Language Basics « Python
- Python
- Language Basics
- If
elif demo

num = input('Enter a number: ')
if num > 0:
print 'The number is positive'
elif num < 0:
print 'The number is negative'
else:
print 'The number is zero'
Related examples in the same category