8000 Finish exercise 5 · Pcodias/intro-to-python@69e423e · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 69e423e

Browse files
author
Replit user
committed
Finish exercise 5
1 parent ee5485c commit 69e423e

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

session_05/exercises_5.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -193,35 +193,29 @@
193193

194194
# Compare choices and determine the winner
195195
if player_choice == computer_choice:
196-
print("It's a tie! Let's play again.")
196+
197197
elif player_choice == "rock":
198198
if computer_choice == "scissors":
199-
print("You win! Rock beats Scissors.")
199+
print("You win!")
200200
player_score += 1
201201
else:
202-
print("You lose! Paper beats Rock.")
202+
print("You lose!")
203203
computer_score += 1
204204
elif player_choice == "paper":
205205
if computer_choice == "rock":
206-
print("You win! Paper beats Rock.")
206+
print("You win!")
207207
player_score += 1
208208
else:
209-
print("You lose! Scissors beats Paper.")
209+
print("You lose!")
210210
computer_score += 1
211211
elif player_choice == "scissors":
212212
if computer_choice == "paper":
213-
print("You win! Scissors beats Paper.")
213+
print("You win!")
214214
player_score += 1
215215
else:
216-
print("You lose! Rock beats Scissors.")
216+
print("You lose!")
217217
computer_score += 1
218218
else:
219219
print("Invalid choice. Please choose either Rock, Paper, or Scissors.")
220220

221-
# Game ends, determine the final winner
222-
print("------------------------------")
223-
print("Final Scores:")
224-
print("Player Score: ", player_score)
225-
print("Computer Score: ", computer_score)
226-
print("------------------------------")
227221

0 commit comments

Comments
 (0)
0