Python脚本之流程控制if语句

时间:2022-04-20 21:44:38

#!/usr/bin/env python

# FileName: if.py


number = 23

guess = int(raw_input('Enter an integer :'))


if guess == number:

print 'Congratulations ,you guessed it.'

print 'But you do not win any prizes!'

elif guess > number:

print 'No, it is a little higher than that.'

else:

print 'No,is is a little lower than that'


print 'Done'


本文出自 “心静梵音” 博客,请务必保留此出处http://masters.blog.51cto.com/6516495/1542424