代码展示: bs=eval(input("请输入步数:")) if 0<= bs<100000: print("无奖励") elif 100000<=bs<150000: print("优秀奖") elif bs <= 150000 < 300000: print("三等奖") elif 300000 <= bs < 450000: print("二等奖") elif bs >= 450000: print("一等奖") else: print("输入的值是负值,请重新输入")
运行结果:
代码展示: bs=eval(input("请输入步数:")) if 0<= bs<100000: print("无奖励") elif 100000<=bs<150000: print("优秀奖") elif bs <= 150000 < 300000: print("三等奖") elif 300000 <= bs < 450000: print("二等奖") elif bs >= 450000: print("一等奖") else: print("输入的值是负值,请重新输入")
运行结果: