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