Question: In Python, Write a propram that uses Functions that lets the user play the pane Rock, Paper, Scissors apainst the computer. The propram should work
In Python,

Write a propram that uses Functions that lets the user play the pane Rock, Paper, Scissors apainst the computer. The propram should work as tollows: the computer's chaice yet!! To geroenter the random nurnter, upe this coder from random import randint Ada this only once at the top of the file choice - randint {0,2+1 2. The user enters his or her choice of "ruck," "popet," or "Scissars" at the keyubard. 3. The comouter's choice is displaved. 4. As wirner is selected iccoarding to the following rules: - If one player chooses rock and the other player chooses scissors, then rock wins. "Reock smashes scissors' should be displayed! - If ane player chanes coiseres and the ather player chenes paper, then crigcens wins. f'Srisenes rut paper' should be dieplayed - If one plaver chooses paper and the other player chocses stissars, then rock wins. "Faper wraps rock" should be displaved) a If both players make the same choice, the Eame must be played zaain to cletennine the winner. Be sure to include comments with at least your name, and a brief descriptian of the code. Example run: (Your's may look different ] heck, 2 eor papar, 3 ent aclasara: 2 confuter chose paper You chose paper You nade the zane choice az the corputer. 3rseting over Snter 1 tor rock, 2 for paper, 3 tor scissors: 1 Ccnputer chose scissors rod chose rock Rock smarites scisenger Pred win tite yatte Bntar 1 for rock, 2 for papar, 3 for aclasora: 4 conputer chose actasiora You chose soorcthing yeat stong You nade an 1nvalid choics. No dimer: gould you libe to play aesine (Y or B)T 3nter 1 tor rock, 2 for paper, 3 tor scissors: 2 conputer chose scissors You chose pojet The eanguter vins the gane weylt wou like to play angalnz(Y or N)e sntar i far rock, 2 for papar, 3 for aclasaral 3 conputer chose paper You chase scissors 3c1szars cut paper You vin the gerre Mould wou like to play acaing(Y or a)? 3nter 1 for rock, 2 for paper, 3 for scissors: 1 Conputer chose rock rou chose rock Yo nathe the 8ane choice as the poguter, Starting dven: 3ntar I for rock, 3 Cor gager, 3 for scissors; 1 computes chose actasar You chose rock Rock smaches zciscors You win the qere gould you libe to play acain? (Y or a) B
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
