Python “expected an indented block”

前端 未结 9 1199
广开言路
广开言路 2020-12-09 08:00

Let me start off by saying that I am COMPLETELY new to programming. I have just recently picked up Python and it has consistently kicked me in the head with one recurring e

9条回答
  •  醉话见心
    2020-12-09 08:49

    Your for loop has no loop body:

    elif option == 2:
        print "please enter a number"
        for x in range(x, 1, 1):
    elif option == 0:
    

    Actually, the whole if option == 1: block has indentation problems. elif option == 2: should be at the same level as the if statement.

提交回复
热议问题