Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

8.10 Python Assignment: Create a Quiz In this program you will create a quiz containing 5 questions. Create a list of strings that stores the

8.10 Python Assignment: Create a Quiz

In this program you will create a quiz containing 5 questions.

Create a list of strings that stores the questions:

"What is the best major?"

"Who is the best prof?"

"What is the best school?"

"What is the coolest name for a prof?"

"What is the best club on campus?"

Create a list of strings that stores the correct answers to each question:

"Computer Science"

"Ryan Hermle"

"ARC"

"Herm-Dawg"

"Embedded Systems Club"

Note: Make sure to match the strings exactly, the tester will require every character to match.

Ask the user each of the questions.

Normally you would use a loop for this, but for now just access each question using index notation

Compare their answers to the corresponding correct answers in your array.

Use the membership in operator with an if statement (see section 8.8)

Keep a count of the number of correct answers.

When the loop completes, show them the total score out of the total possible, and display the percent correct.

Sample output:

What is the best major? asdf Who is the best prof? Ryan Hermle What is the best school? ARC What is the coolest name for a prof? Herm-Dawg What is the best club on campus? Basket Weaving 3 out of 5 0.6 %

8.10.1: Python Assignment: Create a Quiz

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Current Trends In Database Technology Edbt 2006 Edbt 2006 Workshops Phd Datax Iidb Iiha Icsnw Qlqp Pim Parma And Reactivity On The Web Munich Germany March 2006 Revised Selected Papers Lncs 4254

Authors: Torsten Grust ,Hagen Hopfner ,Arantza Illarramendi ,Stefan Jablonski ,Marco Mesiti ,Sascha Muller ,Paula-Lavinia Patranjan ,Kai-Uwe Sattler ,Myra Spiliopoulou ,Jef Wijsen

2006th Edition

3540467882, 978-3540467885

More Books

Students also viewed these Databases questions