2016-11-26 1 views
-2

이 코드의 3 행에서 Unindent does not match any other indentation level 구문 오류를 어떻게 해결합니까?들여 쓰기 구문 오류

if userInput==1: 
    oneD() 
elif userInput==2: 
    twoD() 
elif userInput==3: 
    threeD() 
elif userInput==4: 
    fourD() 
elif userInput==5: 
    fiveD() 
+3

코드에서 탭과 공백을 섞어 보셨습니까? – Blobonat

+0

[IDE] (http://sopython.com/wiki/Python_IDEs)를 사용해보십시오. 개인적으로 PyCharm을 선호합니다. 들여 쓰기를 할 때 "탭"을 누르기 만하면 커서가 오른쪽으로 4 칸 이동합니다. –

답변

0

그것은 다음과 같아야은, 모든 균등 :

if userInput==1: 
    oneD() #this one was not spaced evenly like the rest of your code 
elif userInput==2: 
    twoD()  
elif userInput==3: 
    threeD() 
elif userInput==4: 
    fourD() 
elif userInput==5: 
    fiveD() 
-1

내가 공백 코드에서 혼합 생각을 고정하십시오.

if userInput==1: 
    oneD() 
elif userInput==2: 
    twoD() 
elif userInput==3: 
    threeD() 
elif userInput==4: 
    fourD() 
elif userInput==5: 
    fiveD() 
-1

공백이 코드에 혼합되어 있으므로 탭과 공백이 혼합되어 사용되었습니다. TAB 또는 일반 공백을 사용하여 모두 수정하여 문제를 해결하십시오.