This repository has been archived on 2025-12-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2024-09-20 14:17:13 +03:00

22 lines
702 B
Plaintext

import random
play = "y"
options = ['Scissor', 'Rock', 'Paper']
winnerOptions = ["It's a Draw", "#You Won#", "#Computer Won#"]
while (play.lower() != "no"):
yourVote = int(input("\nEnter 0-Scissor, 1-rock or 2-paper:"))
compVote = random.randint(0, 2)
result = yourVote-compVote
if result != 0:
if (result == 1):
pass
elif (result == -1):
result = 2
elif (result == 2):
pass
else:
result = 1
print(f'The computer is {options[compVote]} You are {options[yourVote]} {winnerOptions[result]}')
play = str(input("\nDo you want to Play again (type no to exit)?:"))
print("\nThanks for playing with me")