测验没有按预期工作

时间:2016-04-12 11:44:30

标签: python-2.7

继续获取语法错误。 我一直在...... 的 CODE:

answer = "b"
question = "1) Who made the game Grand Theft Auto 5??\nPlease choose from  the following and write a letter: \n◘ A)Viral\n◘ B)Rockstar Games\n◘  C)Madfinger\n◘ D)Gameloft"
print(question)
guess=input().lower()
name=input("Please enter your answer: ")
if guess ==answer:
    print("Correct")
    score = score + 1
    print("Score:")
    print(score)

else:
    print("Wrong")

1 个答案:

答案 0 :(得分:3)

你永远不会使用名字,为什么不删除呢?

answer = "b"
question = "1) Who made the game Grand Theft Auto 5??\nPlease choose from  the following and write a letter: \n◘ A)Viral\n◘ B)Rockstar Games\n◘  C)Madfinger\n◘ D)Gameloft\n"
print(question)
guess=input("Please enter your answer: ").lower()
if guess ==answer:
    print("Correct")
    score = score + 1
    print("Score:")
    print(score)

else:
    print("Wrong")