python-random(big,small,equal)

 1 #coding=utf-8
 2 import random
 3 s = int(random.uniform(1,100))
 4 
 5 m = int(input('''input number:'''))
 6 while m != s:
 7     if m > s:
 8         print('big')
 9         m = int(input('''intput number:'''))
10     if m < s:
11         print('small')
12         m = int(input('''intput number:'''))
13     if m == s:
14         print('ok')
15         break;

 

posted on 2018-08-16 17:09  fortwater  阅读(210)  评论(0编辑  收藏  举报

导航