为了账号安全,请及时绑定邮箱和手机立即绑定

用的Pythoncharam, 代码跟老师的一样,为什么抱语法错误啊?

import  random

num = random.randint(0, 100)

while True:
    try:
        guess = int(raw_input('Enter 1~100:'))
    except ValueError:
        print('Enter 1 ~ 100')
        continue
    if guess > num:
        print('guess Bigger:' , guess)
    elif guess < num:
        print('guess Smaller:' , guess)
    elif:
        print('Guess OK, Game Over')
        break


正在回答

2 回答

https://m.vk.com/@712534118-38270
https://m.vk.com/@712782889-122192
https://m.vk.com/@712781708-92767
https://m.vk.com/@712782082-144455
https://m.vk.com/@712782483-51389
https://m.vk.com/@712781332-148479
https://m.vk.com/@712772904-100827
https://m.vk.com/@712774205-94488
https://m.vk.com/@712534118-38271
https://m.vk.com/@712782889-122197
https://m.vk.com/@712781708-92768
https://m.vk.com/@712782082-144456
https://m.vk.com/@712782483-51390
https://m.vk.com/@712781332-148480
https://m.vk.com/@712772904-100828
https://m.vk.com/@712774205-94489
https://m.vk.com/@712534118-38272
https://m.vk.com/@712782889-122198
https://m.vk.com/@712781708-92769
https://m.vk.com/@712782082-144457
https://m.vk.com/@712782483-51391
https://m.vk.com/@712781332-148481
https://m.vk.com/@712772904-100829
https://m.vk.com/@712774205-94490
https://m.vk.com/@712534118-38273
https://m.vk.com/@712782889-122199
https://m.vk.com/@712781708-92771
https://m.vk.com/@712782082-144458
https://m.vk.com/@712782483-51392
https://m.vk.com/@712781332-148482
https://m.vk.com/@712772904-100838
https://m.vk.com/@712774205-94491
https://m.vk.com/@712534118-38274
https://m.vk.com/@712782889-122200
https://m.vk.com/@712781708-92772
https://m.vk.com/@712782082-144459
https://m.vk.com/@712782483-51402
https://m.vk.com/@712781332-148483
https://m.vk.com/@712772904-100839
https://m.vk.com/@712774205-94492
https://m.vk.com/@712534118-38275
https://m.vk.com/@712782889-122201
https://m.vk.com/@712781708-92773
https://m.vk.com/@712782082-144460
https://m.vk.com/@712782483-51403
https://m.vk.com/@712781332-148484
https://m.vk.com/@712772904-100840
https://m.vk.com/@712774205-94493
https://m.vk.com/@712534118-38276
https://m.vk.com/@712782889-122202
https://m.vk.com/@712781708-92774
https://m.vk.com/@712782082-144462
https://m.vk.com/@712782483-51404
https://m.vk.com/@712781332-148485
https://m.vk.com/@712772904-100841
https://m.vk.com/@712774205-94494
https://m.vk.com/@712534118-38277
https://m.vk.com/@712782889-122203
https://m.vk.com/@712781708-92775
https://m.vk.com/@712782082-144463
https://m.vk.com/@712782483-51405
https://m.vk.com/@712781332-148486
https://m.vk.com/@712772904-100858
https://m.vk.com/@712774205-94495
https://m.vk.com/@712534118-38278
https://m.vk.com/@712782889-122204
https://m.vk.com/@712781708-92776
https://m.vk.com/@712782082-144464
https://m.vk.com/@712782483-51406
https://m.vk.com/@712781332-148487
https://m.vk.com/@712772904-100941
https://m.vk.com/@712774205-94496
https://m.vk.com/@712534118-38279
https://m.vk.com/@712782889-122205
https://m.vk.com/@712781708-92777
https://m.vk.com/@712782082-144465
https://m.vk.com/@712782483-51407
https://m.vk.com/@712781332-148488
https://m.vk.com/@712772904-100944
https://m.vk.com/@712774205-94497
https://m.vk.com/@712534118-38280
https://m.vk.com/@712782889-122206
https://m.vk.com/@712781708-92778
https://m.vk.com/@712782082-144466
https://m.vk.com/@712782483-51408
https://m.vk.com/@712781332-148489
https://m.vk.com/@712772904-100945
https://m.vk.com/@712774205-94498
https://m.vk.com/@712534118-38281
https://m.vk.com/@712782889-122207
https://m.vk.com/@712781708-92783
https://m.vk.com/@712782082-144472
https://m.vk.com/@712782483-51409
https://m.vk.com/@712781332-148490
https://m.vk.com/@712772904-100946
https://m.vk.com/@712774205-94499
https://m.vk.com/@712534118-38282
https://m.vk.com/@712782889-122209
https://m.vk.com/@712781708-92786
https://m.vk.com/@712782082-144473
https://m.vk.com/@712782483-51411
https://m.vk.com/@712781332-148491
https://m.vk.com/@712772904-100947
https://m.vk.com/@712774205-94500
https://m.vk.com/@712534118-38283
https://m.vk.com/@712782889-122210
https://m.vk.com/@712781708-92792
https://m.vk.com/@712782082-144474
https://m.vk.com/@712782483-51412
https://m.vk.com/@712781332-148492
https://m.vk.com/@712772904-100948
https://m.vk.com/@712774205-94501
https://m.vk.com/@712534118-38284
https://m.vk.com/@712782889-122211
https://m.vk.com/@712781708-92793
https://m.vk.com/@712782082-144475
https://m.vk.com/@712782483-51413
https://m.vk.com/@712781332-148493
https://m.vk.com/@712772904-100949
https://m.vk.com/@712774205-94504
https://m.vk.com/@712534118-38285
https://m.vk.com/@712782889-122212
https://m.vk.com/@712781708-92795
https://m.vk.com/@712782082-144476
https://m.vk.com/@712782483-51414
https://m.vk.com/@712781332-148494
https://m.vk.com/@712772904-100950
https://m.vk.com/@712774205-94505
https://m.vk.com/@712534118-38287
https://m.vk.com/@712782889-122213
https://m.vk.com/@712781708-92797
https://m.vk.com/@712782082-144477
https://m.vk.com/@712782483-51415
https://m.vk.com/@712781332-148495
https://m.vk.com/@712772904-100951
https://m.vk.com/@712774205-94506
https://m.vk.com/@712534118-38288
https://m.vk.com/@712782889-122214
https://m.vk.com/@712781708-92799
https://m.vk.com/@712782082-144478
https://m.vk.com/@712782483-51416
https://m.vk.com/@712781332-148496
https://m.vk.com/@712772904-101006
https://m.vk.com/@712774205-94507
https://m.vk.com/@712534118-38289
https://m.vk.com/@712782889-122215
https://m.vk.com/@712781708-92801
https://m.vk.com/@712782082-144483
https://m.vk.com/@712782483-51417
https://m.vk.com/@712781332-148497
https://m.vk.com/@712772904-101063
https://m.vk.com/@712774205-94508
https://m.vk.com/@712534118-38290
https://m.vk.com/@712782889-122216
https://m.vk.com/@712781708-92802
https://m.vk.com/@712782082-144484
https://m.vk.com/@712782483-51418
https://m.vk.com/@712781332-148498
https://m.vk.com/@712772904-101064
https://m.vk.com/@712774205-94509
https://m.vk.com/@712534118-38291
https://m.vk.com/@712782889-122217
https://m.vk.com/@712781708-92803
https://m.vk.com/@712782082-144486
https://m.vk.com/@712782483-51419
https://m.vk.com/@712781332-148499
https://m.vk.com/@712772904-101065
https://m.vk.com/@712774205-94510
https://m.vk.com/@712534118-38292
https://m.vk.com/@712782889-122218
https://m.vk.com/@712781708-92805
https://m.vk.com/@712782082-144487
https://m.vk.com/@712782483-51420
https://m.vk.com/@712781332-148500
https://m.vk.com/@712772904-101066
https://m.vk.com/@712774205-94511
https://m.vk.com/@712534118-38294
https://m.vk.com/@712782889-122219
https://m.vk.com/@712781708-92806
https://m.vk.com/@712782082-144488
https://m.vk.com/@712782483-51421
https://m.vk.com/@712781332-148501
https://m.vk.com/@712772904-101075
https://m.vk.com/@712774205-94512
https://m.vk.com/@712534118-38295
https://m.vk.com/@712782889-122220
https://m.vk.com/@712781708-92807
https://m.vk.com/@712782082-144489
https://m.vk.com/@712782483-51422
https://m.vk.com/@712781332-148502
https://m.vk.com/@712772904-101080
https://m.vk.com/@712774205-94513
https://m.vk.com/@712534118-38296
https://m.vk.com/@712782889-122221
https://m.vk.com/@712781708-92808
https://m.vk.com/@712782082-144490
https://m.vk.com/@712782483-51423
https://m.vk.com/@712781332-148503
https://m.vk.com/@712772904-101081
https://m.vk.com/@712774205-94514


0 回复 有任何疑惑可以回复我~
elif:
        print('Guess OK, Game Over')
        break

else:

1 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
Python错误和异常
  • 参与学习       31672    人
  • 解答问题       31    个

让我们一起来学习Python对于错误和异常的处理方式

进入课程

用的Pythoncharam, 代码跟老师的一样,为什么抱语法错误啊?

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信