2
我一直在用Python編寫一個簡單的測驗,但在我的Python GUI中不斷收到「SyntaxError:編譯單個語句時發現的多個語句」。請幫忙。初學者Python 3語法
print("Welcome to my quiz!")
score = 0
question1 = str(input("What colour is a banana."))
if question.lower() == 'yellow':
print("Correct. The answer is", question1)
score = score + 1
else:
print("Incorrect. The answer is yellow, not", question1)
print score
在Python 3 –
@PavelAnossov哦,不'raw_input',心裏很不舒服。這就是我在未安裝Py3的Py3問題上發佈的內容。修正:) –