我一直在Python 3.3.1版本的這個基本計算器程序中出現錯誤。我自己找不到問題,有人可以幫我嗎?非常感謝您提前!爲什麼在編譯單個語句錯誤時發現多個語句? (Python)
x=(input("Which operation would you like to perform?"))
if x=='Addition':
y=int(input("Enter the first number?"))
z=int(input("Enter the second number?"))
a=y+z
print(a)
elif x=='Subtraction':
y=int(input("Enter the first number?"))
z=int(input("Enter the second number?"))
a=y-z
print(a)
elif x=='Multiplication':
y=int(input("Enter the first number?"))
z=int(input("Enter the second number?"))
a=y*z
print(a)
elif x=='Division':
y=int(input("Enter the first number?"))
z=int(input("Enter the second number?"))
a=y/z
print(a)
你能發佈錯誤嗎? – Don
什麼是錯誤 – Rajeev
錯誤只是說「SyntaxError:編譯單個語句時發現多個語句」 它在第一行「x =(input(」您想要執行哪種操作?「))」 – user2399322