Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- import os
- import time
- while True:
- print("\nWelcome to Rock-Paper-Cats Game")
- print("1. Rock")
- print("2. Paper")
- print("3. Cat")
- print("4. Exit")
- choice = int(input("Enter Your Choice:"))
- if (choice == 4):
- break;
- choices = ["Rock", "Paper", "Cat"]
- computer_choice = random.choice(choices)
- user_choice = choices[choice - 1]
- print("\nComputer' choice is: ", computer_choice)
- print("Your Choice is: ", user_choice)
- if (user_choice == 'Rock' and computer_choice == 'Cat') or (user_choice == 'Paper' and computer_choice == 'Rock') or (user_choice == 'Cat' and computer_choice == 'Paper'):
- print("\nCongratulations, You Won!")
- elif (user_choice == 'Rock' and computer_choice == 'Paper') or (user_choice == 'Paper' and computer_choice == 'Cat') or (user_choice == 'Cat' and computer_choice == 'Rock'):
- print("\nComputer Wins!")
- else:
- print("\nIt's a Tie!")
- time.sleep(3)
- os.system('cls' if os.name == 'nt' else 'clear')
- #If youre reading this, fuck you
- # Love, Cat
Add Comment
Please, Sign In to add comment