标签:use count big 一个 str -- for循环 案例 while循环
#!user/bin/env python
# -*- coding:utf-8 -*-
print(“hello,word”)
count=0
age=54
while count<3:
inputage = int(input("age:"))
count += 1
if age==inputage:
print("you are right",age)
break
elif age>inputage:
print("you think small")
else:
print("you think big")
age=58
count=0
while count<3:
count+=1
thinkAge=int(input("age:"))
if age==thinkAge:
print("you are right")
break
elif age>thinkAge:
print("small")
else:
print("bigger")
else:
print("you can try three
times,you can input!")
for a in range(10):
print(a)
for i in range(3):
age=int(input("age:"))
if age==4:
print("right")
break
elif age<4:
print("you are small")
else:
print("big")
else:
print("you childen is‘t to learn in 小学")
for a in range(0,10,2):
print(a)
for a in range(1,10,2):
print(a)
标签:use count big 一个 str -- for循环 案例 while循环
原文地址:http://www.cnblogs.com/tajinshi/p/7440010.html