Question: Write a Python program that asks user whether he/she agrees to the contract. Use input validation loop to check the validity of user input (the
Write a Python program that asks user whether he/she agrees to the contract. Use input validation loop to check the validity of user input (the only valid answers are Yes and No). If the user input is valid, print Got it; otherwise, repeatedly issue warnings to the user and ask the user to re-enter until a valid answer is provided. [Run your program in Python IDLE to verify if it works correctly as described above] Do you agree to the contract? Sure Invalid answer! Re-enter your intention: Yep Invalid answer! Re-enter your intention: Yes Got it
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
