Question: #Create this trivia question-answer dictionary: {'What is the rarest M&M color?':'Brown, What is the common name for dried plums?':'Prunes, What was the first soft drink

#Create this trivia question-answer dictionary: {'What is the rarest M&M color?':'Brown, What is the common name for dried plums?':'Prunes, What was the first soft drink in space?':'Coca Cola, Which country invented ice cream?':'China, What geometric shape is generally used for stop signs?':'Octagon'}

#Prompt user to enter the answer of each trivia question in the dictionary.

#Display the trivia question (dictionary key) when prompting the user.

#If the answer is correct, display: Good job! Otherwise, display: Wrong answer!

#At the bottom, display the number of correct answers and the number of wrong answers.

#The program must not be case sensitive

1.Use for in to read every key and value in the dictionary.

2.Use dictionary key in the input.

3.Use if to check whether the input is correct.

4.Create two counter variables: right and wrong.

5.If the answer is correct, increment right. Otherwise, increment wrong.

#Examples:

#What is the rarest M&M color?brown

#Good job!

#What is the common name for dried plums?PRUNES

#Good job!

#What was the first soft drink in space?Coke

#Wrong answer!

#Which country invented ice cream?ChInA

#Good job!

#What geometric shape is generally used for stop signs? Triangle

#Wrong answer!

#Correct answers: 3

#Incorrect answers: 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!