Professional Documents
Culture Documents
Trivia Homework
Trivia Homework
")
print("Answer the following questions to test your knowledge.")
# list of questions
questions = [
"What is the capital of France? ",
"Which animal is known for its black and white stripes? ",
"What is the chemical symbol for gold? ",
"Who wrote the play 'Romeo and Juliet'? ",
"What is the largest planet in our solar system? ",
"What is the tallest mammal in the world? ",
"What is the largest country in the world? ",
"What is the largest ocean in the world? ",
"What is the smallest continent in the world? ",
"What is the largest desert in the world? ",
"Who wrote the novel 'To Kill a Mockingbird'? ",
"Who is the author of the Harry Potter series? ",
"Where is the Great Barrier Reef located? ",]
#list of answers
answers = [
"Paris",
"Zebra",
"Au",
"William Shakespeare",
"Jupiter",
"Giraffe",
"Russia",
"Pacific",
"Australia",
"Sahara Desert",
"Harper Lee",
"J.K. Rowling",
"Australia",]
# loop to get the names of each player and add them to the list
for player in range(num_players):
name = input("Enter the name of player {}: ".format(player+1))
names.append(name)
# Determine the winner by finding the player with the highest score
highest_score_so_far = scores[0]
player_with_highest_score = names[0]