用if来实现猜年龄
age_of_master=66
guess_age=input(">>:")
if age_of_master==int(guess_age):
print("yes,you are right") #print钱tab缩进
else:
print("no,you must kidding me ")
多分支if语句:
score=input("you score:") if int(score)>90: print("you got an A") elif int(score)>80: print("you got an B") elif int(score)>60: print("you got an C") else : print("you should try harder!")