i = 1
while True:
while i <= 3:
age = int(input("input yout guess age:"))
if age == 22:
print("yes!")
elif age < 22:
print("no,your guess little!")
elif age > 22:
print("no,your guess old!")
else:
print("press error!")
i += 1
print("you are pig!")
j = input("continue to guess? >: yes / no")
if j == "yes":
i = 1
print(end = "")
elif j == "no":
break
else:
print("press error!")
相关文章
- 10-13《Python从入门到实践》--第七章 while循环 课后练习
- 10-13python中while循环运算符及格式化输出
- 10-13Python基础之流程控制while循环
- 10-13python学习之while 和for循环
- 10-13python(7)- 小程序练习:循环语句for,while实现99乘法表
- 10-13[Python]Python 使用 for 循环的小例子
- 10-13python之while循环
- 10-132017-12-14python全栈9期第一天第八节之循环语句while
- 10-13Python 3基础教程5-while循环语句
- 10-134:Python的while循环