首页 > 编程 > Python > 正文

笨方法学python--习题31---做出决定。

2019-11-06 07:41:33
字体:
来源:转载
供稿:网友
#coding=uft-8PRint "You are goonna enroll to our school, what's your age (month)"age = raw_input(">")if age >= "18": print " You are a big boy now, welcome to IC." elif age <= "18": print "You are tiny baby, Nido will be good for you." print "1. Your age is from 3-9" print "2. Your age is from 9-18."  Nido = raw_input(">") if Nido == "1":  print" Welcome to baby Nido." elif Nido == "2":  print "Welcome to walking Nido."  else: print "GOOD BYE. SEE YOU AGAIN."#note:在终端raw_input() 进来的数字是 字符串。 但它还是带又数字属性,可以用来比较大小的。并不是说它是字符串就相当个句子,而不能和别的同样又字符串属性 的数字比较。
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表