Question: Write a function three _ options ( text , optionA, optionB, optionC ) , that takes in four parameters: text is a string representing a
Write a function threeoptionstext optionA, optionB, optionC that takes in four parameters:
text is a string representing a prompt in a text adventure game
optionA, optionB, and optionC are strings representing the three possible options.
The function should print out the prompt, and then print out the options label them with A B and C Next, use the input function to ask the user to choose A B or C If the user does not choose one of AB or C then the function should print out 'Invalid option, try again. and prompt the user to choose again.
Finally, the function should return not print the one character string that represents the users choice: AB or C
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
