Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Leading Strategic Change In An Era Of Healthcare Transformation

Authors: Jim Austin ,Judith Bentkover ,Laurence Chait

1st Edition

3319808826, 978-3319808826

Students also viewed these Programming questions

Question

Find the derivative of the function. 7x 6- tan(x) f(x)

Answered: 1 week ago