# coding:utf-8
from random import randint
num=randint(1,100)
print "guess the right number ,so please input a number:"
a=1
while a==1:
answer=input() ##把输入赋值给answer以便条件中用到比较大小
if answer<num :
print "it‘s too small"
if answer>num :
print "it‘s too big"
if answer==num :
print "right"
时间: 2024-12-17 16:32:59