python if 语句 if语句结构 if 判断条件: 执行语句…… else: 执行语句…… if else 是一个整体,必须连用,else不可以单独出现 python实现猜年龄小程序 age_of_princal = 50 guess_age = int ( input('请输入你猜测的年龄>>:') ) if guess_age == age_of_princal: print ("yes,you got it..") else: print ("you are worng")