python elsif statement

python else if statement


>>> x = int(raw_input("Please enter a number: "))
>>> if x < 0:
... x = 0
... print 'Negative changed to zero'
... elif x == 0:
... print 'Zero'
... elif x == 1:
... print 'Single'
... else:
... print 'More'

Comments

narayana p said…
I like your blog, I read this blog please update more content on python, further check it once at python online training

Popular posts from this blog

Vim vi how to reload a file your editing