典型的意外缩进错误。这是相关代码。问题是我如何修复它?在
def getNum():
firstNum = input("Please state what number to start at: ")
secondNum = input("Please state swhat number to end at: ")
if countingSubmenu == 3 or countingSubmenu == 4:
thirdNum = input("Please state what increment you would want to go up by: ")
return firstNum, secondNum, thirdNum
else:
return firstNum, secondNum
if option == 1:
getNum(firstNum, secondNum, thirdNum)
for x in range(firstNum, secondNum+1, 1):
print x
print "End of test." #def getNum():
这三行使用制表符而不是空格:
你可以很容易地看到这一点,通过编辑问题,标签显示宽度为8个空格。在
相关问题 更多 >
编程相关推荐