for循环:
for i in range(0,10,2):
print("loop",i)
for循环写猜年龄:
age_of_XueKe=18
for i in range(3):
age = int(input("age:"))
if age == age_of_XueKe:
print("Yes,you got it!")
break
elif age >age_of_XueKe:
print("Think smaller!")
else:
print("Think bigger!")
else:
print("You have tried too many times...")
转载于:https://www.cnblogs.com/shmilymima/p/9265590.html
最后
以上就是舒服金针菇最近收集整理的关于for循环及用for循环写猜年龄游戏的全部内容,更多相关for循环及用for循环写猜年龄游戏内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复