猜数游戏
2018-05-15 本文已影响0人
叫我七夜
#!/usr/bin/env python
#_*_conding:utf-8_*_
age =22
count =0
for iin range(10):
print("You have ten chose,and this is the",i,"choce")
guess_num =int(input("guess your num:"))
if count <3:
if guess_num == age:
print("is rige:",age)
elif guess_num >age:
print("Think smaller")
else:
print("Think lager")
else:
str =input("are you continue y/n:")
if str =='y':
count =0
continue
else:
print("bye")
exit(0)
count +=1 # count = count + 1