python基础:for循环
for i in range(10):
print("loop ",i)
age_girl =18
for i in range(3):
guess_age = int(input("guess age:"))
if guess_age == age_girl :
print("yes,you got it. ")
break
elif guess_age > age_girl:
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)
for i in range(0,10):
if i <3:
print("loop",i)
else:
continue
print("hehe...")
for i in range(10):
print('--------',i)
for j in range(10):
print(j)
if j >5:
break