python 猜数字小程序

 

 1 import random
 2 x = random.randrange(1,99,1)
 3 while 1:
 4     i=int(input("please input the age you guess"))
 5     if i>x:
 6         print ("too large")
 7     elif i<x:
 8         print ("too small")
 9     else :
10         print ("bigo")
11         break

 

posted @ 2019-07-15 10:47  淇实是我  阅读(429)  评论(0编辑  收藏  举报