鱼C论坛

 找回密码
 立即注册
查看: 3272|回复: 10

[已解决]新手,不知道为什么输入一个值,疯狂跳出回复

[复制链接]
发表于 2020-3-13 21:31:27 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
求助。。。
最佳答案
2020-3-13 21:38:01
低调的小白er 发表于 2020-3-13 21:33
输入比8大或者小的数之后,疯狂回复(“it is.....)

改成这样:
  1. number=int(input("please fil in:"))
  2. while True:
  3.     if number ==8:
  4.          print("you are my only")
  5.          break
  6.     else:
  7.         if number>8:
  8.             print("it is too big")
  9.             number=int(input("please fil in:"))
  10.             continue
  11.         else:
  12.             print("it is too small")
  13.             number=int(input("please fil in:"))
  14.             continue
  15. print("game is over")
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2020-3-13 21:32:12 | 显示全部楼层
C:\Users\13374\Desktop
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-3-13 21:32:50 | 显示全部楼层
发不了照片,number=int(input("please fil in:"))
while number!=8:
    print("it is wrong")
    if number ==8:
         print("you are my only")
    else:
        if number>8:
            print("it is too big")
        else:
            print("it is too small")
print("game is over")
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-3-13 21:33:32 | 显示全部楼层
输入比8大或者小的数之后,疯狂回复(“it is.....)
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2020-3-16 22:53:33 | 显示全部楼层
qiuyouzhi 发表于 2020-3-13 21:58
有帮助就设个最佳答案吧~

不太会搞...
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-11-4 08:39

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表