Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. Create a sub class MultiChoiceQuestion to the question hierarchy of Section 10.1 that allows multiple correct choices. The respondent should provide all correct choices,

image text in transcribed
4. Create a sub class MultiChoiceQuestion to the question hierarchy of Section 10.1 that allows multiple correct choices. The respondent should provide all correct choices, separated by spaces. Provide instructions in the question text. Below is the program that runs the class MultiChoiceQuestionpy. 4 pts # This program shows a simple quiz with one question. it Create the question and expected answer. q : MultiChoiceQuestionO q.setText{"Of Apple, Tomato, Carrot. Cucumber and Celery, list all that are fruit") q.setAnswerC'AppIe Tomato") # Display the question and obtain user's response. q.display0 response : inputC'Your answer: "} print(q-checkAnswer(response)) Note: Responses of \"Apple Tomato\" or \"Tomato Apple \" are both correct. W a) Your code with comments b) A screenshot of the execution

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

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions