xuruibill 2022-03-29 00:35 采纳率: 80%
浏览 6792
已结题

IndentationError: unindent does not match any outer indentation level

door = input(">")

if door == "1":
print("there's a giant bear here eating a cheese cake")

bear = input(">")

if bear == "1":
    print("the bear eats your face off. good job")
elif bear == "2":
    print("the bear eats your legs off.")
else:
    print(f"well,doing{bear} is probablly better.")**

elif door == "2":
print("you stare into the endless abyss at cthulhu's retina")

insanity = input(">")
if insanity == "1" or insanity =="2":
    print("good job")
else:
    print("good")

else:
print("you stumble around and fall on a knife and die. good job")

反复检查格式都没问题,运行显示
^
IndentationError: unindent does not match any outer indentation level
(base) PS E:\bbf> python ex31.py
File "E:\bbf\ex31.py", line 12
elif bear == "2":

  • 写回答

3条回答 默认 最新

  • FriendshipT 2022-03-29 02:01
    关注

    缩进问题,大概率是print前面的空格或tab不对,试试,将print回退到else:的后面,再回车。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

问题事件

  • 系统已结题 4月18日
  • 已采纳回答 4月10日
  • 创建了问题 3月29日

悬赏问题

  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来