gfgregre 发表于 2015-9-9 09:35:57

python中交互输入函数raw_input

用户输入年龄,打印输出


age = int(raw_input("Please input your age:"))
if age > 50:

        print "you are old, need to retire. "
elif age > 30:
        print "You are in the middle age !"
elif age > 18:
        print "You are adult!"
else:
        print "too young!"

页: [1]
查看完整版本: python中交互输入函数raw_input