Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

while (True):
print("Rock \nPaper \nScissors!!!!!")
player1 = input("Enter your choice: ")
player1 = input("Enter your choice: ").upper()
choices = ["ROCK", "PAPER", "SCISSORS"]

if player1 not in choices:
print("Invalid choice, please choose ROCK, PAPER, or SCISSORS.")
continue

player2 = choice(choices)
print("SHOOT!!!")
print(f"player 2 played {player2}")
Expand All @@ -19,7 +24,7 @@
else:
print("Tied")
print("---------------------------------------")
flag = input("Do you want to continue? ")
flag = input("Do you want to continue? ").lower()
if flag.lower() == "no":
break
elif flag.lower() == "yes":
Expand Down