Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Build a program that plays Rock, Paper, Scissors. The program should first accept an integer input from player 1. Then, it should accept an integer
Build a program that plays Rock, Paper, Scissors. The program should first accept an integer input from player 1. Then, it should accept an integer input from player 2. For each input, the value 1 represents "rock", 2 represents "paper", and 3 represents "scissors". All other values are invalid. If either player inputs an invalid value, the program should print Error and stop executing.
In python please!
False True p1 == P2 Output: "tie" False True p1 == "rock" False True p2 == "paper" False True p1 == "paper" Output: "p1 wins" Output: "p2 wins" False True p2 == "rock" False Output: p2 == "rock" True Output: "p2 wins" "p1 wins" Output: "p1 wins" Output: "p2 wins" ENDStep 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