1 fromrandom importrandint
2
3 defran():
4 returnrandint(1,100)
5
6 c=ran()
7
8 # Guess Number
9 # Writen By 小乖乖
10 count=0
11 while(count<5):
12
13 a=input()
14
15 ifa>c:
16 print"too large ,try again"
17 elifa<c:
18 print"too small, again"
19 else:
20 print"good ,right"
21 print"count number times=",count+1
22 break
23 count=count+1
24 else:
25 print"answer=",c
26
27