用Python实现一个简单的猜数字游戏

import random
number = int(random.uniform(1,10))
attempt = 0
while (attempt < 3):
m = int(input('Please try to guess the number!'))
if m == number:
print('bingo!')
break
elif m < number:
print('Your answer is smaller!')
attempt += 1
else:
print('Your answer is bigger!')
attempt += 1
else:
print(' Your try has run out!\n','game over')
上一篇:与众不同 windows phone (30) - Communication(通信)之基于 Socket TCP 开发一个多人聊天室


下一篇:JS原生上传大文件显示进度条-php上传文件