菩萨蛮·黄鹤楼

茫茫九派流中国,沉沉一线穿南北。烟雨莽苍苍,龟蛇锁大江。
黄鹤知何去,剩有游人处。把酒酹滔滔,心潮逐浪高!

--coding:UTF-8--

import random
secret = random.randint(1,100)
'''print secret'''
print('------游戏开始-----')
guess = 0
while guess != secret:
temp = input('请输入数字:')
guess = int(temp)
if guess > secret:
print ('您猜的数字过大')
elif guess < secret:
print ('您猜的数字小了')
if guess == secret:
print ('恭喜你!!!猜对了')
print ('上台表演吧^_^')

05-08 15:09