小编Tir*_*tel的帖子

初学者Python 3语法

我一直在用python编写一个简单的测验,但在我的Python GUI中继续得到"SyntaxError:在编译单个语句时找到多个语句".请帮忙.

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
Run Code Online (Sandbox Code Playgroud)

python syntax python-3.x

2
推荐指数
1
解决办法
216
查看次数

标签 统计

python ×1

python-3.x ×1

syntax ×1