Share your repls and programming experiences

← Back to all posts
my rock paper scissor game code
hcerri (2)

import random

rock = '''

_______

---' __)
(___
)
(_)
(__)
---.
(___)
'''

paper = '''

_______

---' __)__
__)
___)
___)
---.__)
'''

scissors = '''

_______

---' __)__
__)
__)
(__)
---.
(___)
'''

choice =int(input("enter '0' for rock, '1' for paper, '2' for sissors;\nany other number to end: \n"))

computer_choice = random.randint(0,2)
image = [rock,paper,scissors]
names = ['rock','paper','scissors']

if choice >=0 and choice <= 2:
print(image[choice],"\n you picked ",names[choice] )

print(image[computer_choice],"\n computer picked ",names[computer_choice] ,"\n")

if choice == computer_choice:
print("It/'s a tie!")

deciding winner

if choice ==0:
if computer_choice == 2:
print("You win!")
elif computer_choice == 1:
print('You lose')

if choice ==1:
if computer_choice == 0 :
print("You win!")
elif computer_choice == 2:
print('You lose')

if choice ==2:
if computer_choice == 1:
print("You win!")
elif computer_choice == 0:
print('You lose')

else:
print("you made a wrong choice!. Pick 0,1 or 2")

Comments
hotnewtop
DuckMonkey (6)

that's really cool! I love the hands lol