Question: I have this python code please can you make changes to it to print the same output in the picture!! I need the same output,

I have this python code please can you make changes to it to print the same output in the picture!! I need the same output, please!

Here is the code:

PYTHON CODE:

# package for generating random number import random

# list to store the element for game t = ["rock", "paper", "scissors"]

# function to get the computer choice def get_ComputerMove():

# generating number r=random.randint(0,2)

# return the computer choice return t[r]

# function to get the player move def get_PlayerMove():

# getting user choice as input choice=input(' Enter "Rock","Paper" or "Scissors" : ') choice=choice.lower()

# return the choice return choice

# function to find the winner def calculate_Winner(c,p):

# displaying the computer choice print(' Computer choice is',c)

# deciding the winner based on the computer and user choice if p == c: print("Tie!") elif p == "rock": if c == "paper": print(" You lose!", c, "covers", p) else: print(" You win!", p, "smashes", c) elif p == "paper": if c== "scissors": print(" You lose!", c, "cut", p) else: print(" You win!", p, "covers", c) elif p == "scissors": if c == "rock": print(" You lose...", c, "smashes", p) else: print(" You win!", player, "cut", computer) # main function, calls other functions def main():

# infinite loop while True:

# calling the various functions c=get_ComputerMove() p=get_PlayerMove() calculate_Winner(c,p)

# testing if __name__=='__main__':

# calling the main function main()

And here is the correct output:

I have this python code please can you make changes to it

Python 3.6.3 Shell File Edit Shell Debug Options Window Help Python 3.6.3 (v3.6.3:2c5fed, Oct 3 2017, 18:11:49) MSC v.1900 64 bit (AMD4) on win32 Type "copyright", "credits" or "licenor more information. RESTART: GEO-IBMD Drive\Files_teachingMCCSpring cts\Proj 6\Exercise 5-21 . 2018\PythonlExample Proje Enter 1 for rock, 2 for paper, 3 for scissors:1 Computer chose rock tou chose rock You made the same choice as the computer. Starting over Enter 1 for rock, 2 for paper, 3 for scissors: 2 Computer chose rock You chose paper You win the game Ln: 8 Col:0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!