Compare commits
2 Commits
1e6640a00a
...
260b94e218
| Author | SHA1 | Date | |
|---|---|---|---|
| 260b94e218 | |||
| ee1c344da7 |
@@ -14,6 +14,10 @@ ties = 0
|
||||
|
||||
while True:
|
||||
|
||||
print(f'''We are going to play a game of Rock, Paper, Scissors!
|
||||
losses: {losses} wins: {wins} ties: {ties}''')
|
||||
|
||||
|
||||
# Computer choice:
|
||||
|
||||
computer_choice = random.randint(1,3)
|
||||
@@ -26,11 +30,11 @@ while True:
|
||||
|
||||
# Player choice:
|
||||
player_choice = input('What do you choose? Rock(R), Paper(P), or Scissors(S)?\n>')
|
||||
if player_choice == 'P':
|
||||
if player_choice == 'P' or player_choice == 'p':
|
||||
player_choice = 'Paper'
|
||||
elif player_choice == 'R':
|
||||
elif player_choice == 'R' or player_choice == 'r':
|
||||
player_choice = 'Rock'
|
||||
elif player_choice == 'S':
|
||||
elif player_choice == 'S' or player_choice == 's':
|
||||
player_choice = 'Scissors'
|
||||
else:
|
||||
print(f'The choice you made ("{player_choice}") is not valid. The program will now exit')
|
||||
|
||||
Reference in New Issue
Block a user