菜鸟生活(python)之for循环
#/usr/bin/env python
#-*-conding:utf-8-*-
guess_age = 22
for i in range(3): #循环次数
guess_age1 = int (input("Please input age :"))
if guess_age1 == guess_age:
print ("yes ,you got it.")
break
elif guess_age > guess_age:
print("think smaller...")
else:
print("think bigger...")
else: #跳出程序执行
print("you have tried too many times ...fuck off!")
for i in range(0,10,2):
print("loop",i)
if i == 6:
continue