Answered step by step
Verified Expert Solution
Question
1 Approved Answer
a = 'welcome rock paper scissors ' print(a.title()) print() player1score: int = 0 player2score: int = 0 while True: start = input(Enter 1 to start
a = 'welcome rock paper scissors ' print(a.title()) print("") player1score: int = 0 player2score: int = 0 while True: start = input("Enter 1 to start the game and press any other key to leave the game: ") if start == "1": while player2score or player1score................................................................................................................................................
When player 1 is the winner it works fine but when player 2 is the winner the loop doesn't end
In this next Image when I try to let player 2 win, it just infinite loop why is that
Welcome Rock Paper Scissors Enter 1 to start the game and press any other key to leave the game: 1 Player one Enter R, P, or S. For ROCK, PAPER, SCISSORS: R Player two Enter R, P, or S. For ROCK, PAPER, SCISSORS: S Playerl has Won this round Player one Enter R, P, or S. For ROCK, PAPER, SCISSORS: R Player two Enter R, P, or S. For ROCK, PAPER, SCISSORS: S Playerl has Won this round Player one Enter R, P, or S. For ROCK, PAPER, SCISSORS: R Player two Enter R, P, or S. For ROCK, PAPER, SCISSORS: S Playerl has Won this round Game Over Thank You Welcome Rock Paper Scissors Enter 1 to start the game and press any other key to leave the game: 1 . Player one Enter R, P, or S. For ROCK, PAPER, SCISSORS: S Player two Enter R, P, or S. For ROCK, PAPER, SCISSORS: R Player2 has won this round Player one Enter R, P, or S. For ROCK, PAPER, SCISSORS: S Player two Enter R, P, or S. For ROCK, PAPER, SCISSORS: R Player2 has won this round Player one Enter R, P, or S. For ROCK, PAPER, SCISSORS: S Player two Enter R, P, or S. For ROCK, PAPER, SCISSORS: R Player2 has won this round Player one Enter R, P, or S. For ROCK, PAPER, SCISSORS: S Player two Enter R, P, or S. For ROCK, PAPER, SCISSORS: R Player2 has won this round Player one Enter R, P, or S. For ROCK, PAPER, SCISSORS: S Player two Enter R, P, or S. For ROCK, PAPER, SCISSORS: R Player2 has won this round Player one Enter R, P, or S. For ROCK, PAPER, SCISSORS
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