Repl.it
Python
Ch 07 #5: Rock, Paper, ScissorsModification
Programming Exercise 11 in Chapter 6 asked you to designa program that plays the Rock, Paper, Scissors game. In theprogram, the user enters one of the three strings - “rockâ€,“paperâ€, or “scissors†- at the keyboard. Add input validation(with a case-insensitive comparison) to make sure the user entersone of those strings only.
I demonstrated the implementation of the program here:https://repl.it/@profeldridge/week06assignment06part2of2#main.py
Using the repl.it link above, modify the program toimplement a new function called “get_user_input_validated()†thatperforms input validation (with a case-insensitive comparison) tomake sure the user enters one of those strings only.
Requirements
You must use the given function prototypes. You can addmore functions if you like.
def get_user_input_validated()
Resources
Example Runs:
Please enter your choice(rock/paper/scissors):
rocks
Sorry - that selection is not valid. Please enter thetext 'rock', 'paper', or 'scissors'
peppers
Sorry - that selection is not valid. Please enter thetext 'rock', 'paper', or 'scissors'
ROCK
Human: [ rock ] vs. Computer: [ paper ]
Sorry! You lost
Deliverables
Source Code File: Name your file main.py and submit toCanvas.
Be sure to follow a Python Style Guide:
Original (v1.0)https://lrccd.instructure.com/courses/102062/pages/python-code-style-guide?module_item_id=5176726