学习python,第一篇
程序员文章站
2022-04-14 15:08:54
结果:danie danie itxpl danie 猜年龄 age_itxpl = 35 for i in range(3): guess_age = int(input("guess age:")) if guess_age == age_itxpl: print("yes,you got it ......
name = "danie" name2 = name print(name,name2) name = "itxpl" print(name,name2)
结果:danie danie
itxpl danie
猜年龄
age_itxpl = 34 count = 0 while count < 3: guess_age = int(input("guess_age:")) if guess_age == age_itxpl: print("yes,you guess right!") break elif guess_age > age_itxpl: print("Make a guess!") else: print("Guess a little bigger!") count +=1 else: print("Guess the wrong invitation to dinner!")
age_itxpl = 35 for i in range(3): guess_age = int(input("guess age:")) if guess_age == age_itxpl: print("yes,you got it.") break elif guess_age > age_itxpl: print("think smaller...") else: print("think bigger!") else: print("you have tride too many time..fuck off")
上一篇: ai简笔画图标怎么填色? ailogo图形填充又层次感渐变颜色的技巧
下一篇: 一、计算机基础