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日

悬赏问题

  • ¥15 网络设备配置与管理这个该怎么弄
  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器