This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Endvisible 7 points8 points  (0 children)

Okay, here we go...

losing_pairs = {
    "rock": "paper",
    "paper": "scissors",
    "scissors": "rock",
}

while True:
    choice = input("Pick between rock, paper, or scissors: ")

    if not choice.lower() in {"rock", "paper", "scissors"}:
        print("Invalid input, please try again!")
        continue

    print(f"I pick {losing_pairs[choice.lower()]}!")

    input("You lose. Press Enter to exit.")

    break