Question: I need this in PYTHON please. Thank you! Add a class MultiChoiceQuestion to the question hierarchy of Section 10.1 that allows multiple correct choices. The
I need this in PYTHON please. Thank you!
Add a 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 MultiChoiceQuestion.py.
##
# This program shows a simple quiz with one question.
#
# Create the question and expected answer.
q = MultiChoiceQuestion()
q.setText("Of Apple, Tomato, Carrot, Cucumber and Celery, list all that are fruit.")
q.setAnswer("Apple Tomato")
# Display the question and obtain user's response.
q.display()
response = input("Your answer: ")
print(q.checkAnswer(response))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
