0
我遇到了我的游戏节目代码的高分问题,我写了一切正常,但我无法得到它打印最终的分数,它不会打印出高分我称之为任何人都可以看看代码并告诉我我做错了什么?谢谢!Python游戏节目高分
num_ques = 0
correct = 0
for question_object in questions:
print(question_object["question"])
for i, choice in enumerate(question_object["answers"]):
print(str(i + 1) + ". " + choice)
answer = input("Choose an answer 1-4:")
num_ques = num_ques + 1
if answer == question_object["correct"]:
print("Bravo. You're a nerd")
correct = correct + 1
print("Your score is: %d/" % correct + str(num_ques))
else:
print("Your score is: %d/" % correct + str(num_ques))
print("Well at least you have a life.")
什么是电流输出? – Raptor