age=float(raw_input("enter your age:"))
grade=int(raw_input("enter your grade:"))
color=raw_input("enter your favorite color:")
if age >=8 and grade >=3 and color=="green":
print "you can play this game."
else:
print "sorry ,you can't play the game."
#只有age >=8,grade>=3,color==green才能玩游戏
转载于:https://blog.51cto.com/huzhongliang/1890520