Question
RUBRIC: Please follow the below rubrics and make sure to use functions in check_input module(you can find the check_input.py file in the modules section) Lab
Please follow the below rubrics and make sure to use functions in check_input module(you can find the check_input.py file in the modules section)
Lab 2 - Rock/Paper/Scissors - 10 points
1 - 2 points Has weapon_menu function to get user's input. Repeatedly checks for validity that the input is an R, P, S, or B. Returns the valid input.
2 - 2 points Has displayScore function. Passes in the player and computer scores and displays them. Has comp_weapon function. Randomly chooses the computer's weapon and returns either a R, P, or S.
3 - 2 points Has find_winner function. Passes in the player and computer weapon choices. Has if statements to compare those values to display the results and return the winner (0=Tie, 1=Player, 2=Computer).
4 - 2 points Main function has a loop that repeats the main menu until the user quits, as well as a loop that repeats the game (option 1). Displays correct output for user and computer throws, result of the round, and scores. Takes in user input and checks for invalid values using check_input module: 1. Rejects all strings on main menu and integers outside of 1-3 range. 2. Rejects all strings on weapon menu that are not R, P, S, or B
5 - 2 points Code Formatting: 1. Correct spacing. 2. Meaningful variable names. 3. No global variables. 4. Documented functions with docstrings. 5. Added other comments to code.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started