Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I made a rock paper scissors program. When ran it does not print the robot output and does not the round. Would love some help

I made a rock paper scissors program. When ran it does not print the robot output and does not the round. Would love some help please! Ps: I am using Python Idle 3.7.2
image text in transcribed
image text in transcribed
image text in transcribed
File Edit Format Run Options Window Help mport random def your move ): robo pick random.randint (1, 3) user score 0 robot score o user_pick input ("1-Rock, 2-Paper, or 3-scissors " print ("My move was", robo_pick) if user pick("1-Rock"): print("You chose Rock") return 1 elif user pick2-Paper") return 2 user-pick return 3 elif ("3-Scissors") : "- else: I Printr tnva lid choice. print (your move )) def robot move O: return your_move ) robo_pick random.randint (1, 3) if robot move1: print("Robot chose Rock") return 1 elif robot move m= 2: print ("Robot chose Paper") return 2 Project 4.1py- CAUsers Anna Turner Desktop Programming Projects Project 4.1.py (3.7.2) File Edit Format Run Options Window Help print ("Robot chose Paper" ceturn 2 elif robot move 3: print ("Robot chose Scissors" ceturn 3 orint (robot move 0) ef bothmove ): (your move )robot move): print("Is a tie") return eli (your move i and robot move 3) F (your move2 and robot move (your move -3 and robot move - 2): print(You win!") return1 (your move 1and robot move 2) or (your move 2 and robot nove2)F (your move 3 and robot move1): print("You lose.") return 4 print ("Invalid input") ceturn4 rint (both move ) your score robot score- Round:'+str (round)) lef round over (your move, both move, robot move) round while round >15 round round 1 elif (your move 1 and robot move2) or (your move2 and robot move 2) r (your move print ("You lose.") return 4 else: print ("Invalid input") return 4 print (both move O) your_ score0 robot score0 ('Round:'+ str (round) ) def round_ over (your_move, both move, robot move): round0 while round 15: round round 1 if both movestr (1): your_score your_score 1 print ("Your score is:", your_score) print ("Robot score is:", robot_score) elif both movestr (4): robot score robot score 1 print("Your score is:", your_score) print ("Robot score is:", robot_score) int (round_over (your_move, both move, robot_move) ) print("Game Over")

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899