我正在开发这个项目,我刚刚开始,我尝试编译它并在第8行,无论我做什么它总是有一个错误,说它期望一个缩进的块,我找不到任何东西错误。我已经阅读了其他问题但他们根本没有帮助。这是编译器中的错误,还是由于某种原因它不起作用?
def main():
print("This game is the first created by the G.R.R. Digital Entertainment Division.")
a = input("Welcome to The Forest. It is currently dawn in the middle of a temperate forest. You wake up, unknown of your surroundings. What do you do? ")
if a == 'Go north' or 'Go North':
print("You went North until you came to the border of the forest and a pasture. You see house with smoke coming out of the chimney ahead of you, a creek to your right, a meteor coming in from your left, and a forest behind you.")
elif a == 'Go West' or 'Go west':
elif a == 'Go east' or 'Go East':
elif a == 'Go south' or 'Go South':
elif a == 'Check supplies' or 'Check Supplies':
print("You currently have a Compass, a dagger, a cyanide pill for suicide, a bottle of iodine, clothes, and a fannypack.")
a =
elif a == 'suicide' or 'Suicide':
else:
以下是错误:
Traceback (most recent call last):
File "python", line 7
elif a == 'Go east' or 'Go East':
^
IndentationError: expected an indented block
答案 0 :(得分:0)
使用<link>
“忽略”或跳过部分:
pass