24小时热门版块排行榜    

查看: 1067  |  回复: 3
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

fwks3518

木虫 (正式写手)

[求助] python程序哪里出了问题?

今天刚接触python,就自己试着编写了一个猜数的小游戏,但结果总是不对,请python达人指教。
# This program is designed for guessing game
import random
x=random.randint(0,100)
m=0
while m<5:
        y=raw_input('Please enter a number between 0 and 100:')
        if y                 print ('too small!')
        elif y>x:
                print ('too big!')
        else:
                print ('You are clever!')
        m=m+1
else:
        print 'The true number is:',x
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 fwks3518 的主题更新
信息提示
请填处理意见