Question: Write a function that takes a prompt string, a minimum value, and a maximum value. In that function, use the prompt to ask the user
Write a function that takes a prompt string, a minimum value, and a maximum value. In that function, use the prompt to ask the user to enter a number. Use validation to assure that the value entered is the correct data type, is greater than or equal to the minimum value, and is less than or equal to the maximum value. Give any needed error messages to help the user correct invalid entries. Continue looping, and giving error messages until a valid entry is given. Return the valid entry as a number.
Write a program that asks the user for minimum and maximum values and then call the function you wrote, using those values as the minimum and maximum arguments. Print the number returned from the function.
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
