def quiz(qs):
score = 0
for q,a in qs.items():
if input(q).lower()==a.lower():
score+=1
print('true')
return score
def main():
qs = {"What's the capital of England? ":"London",
"What's the third planet in the Solar System? ":"Earth",
"Who wrote \"Great Expectations\"? ": "Charles Dickens",
"Who sang \"Someone Like You\"? ":"Adele",
"Who is the current Doctor Who? ":"Peter Capaldi",
"Who is the sheriff in \"The Walking Dead\"? ": "Rick Grimes",
"Which metal is liquid at room temperature? ": "Mercury",
"Who plays Katniss in \"The Hunger Games\"? ": "Jennifer Lawrence",
"Which element combines with hydrogen to make water? ": "Oxygen",
"What is the highest mountain in the UK? ": "Ben Nevis"}
print("*** Quiz ***\n")
name = input("Please enter your name: ")
print()
print("\nWell done {0}, you scored {1} out of {2}).".format(name, quiz(qs), len(qs)))
if __name__ == "__main__":
main()
And finally, I ran the program it works and it asked me several questions I gave the correct answers for only 4 questions london,mercury,earth and oxygen but you program said "Well done" where I actually failed in the in test you should fix it too.