!/usr/bin/env python

--encoding:utf-8--

import random

think=random.randint(1,10)

print ("......这是一个小游戏....")

temp=input("你猜我心里想的是什么数字:")

guess=int(temp)

while guess!=think:

if guess>think:
print("猜的大了....!")
else:
print("猜的小了....!") temp=input("哎呀,猜的不对,请重新猜:")
guess=int(temp)

if guess==think:

print("恭喜你猜对了,你怎么知道我心里想的,是我肚子里的蛔虫?")

print("就算猜对了也没奖励")

print("游戏结束,不玩了")

05-04 06:34