rock = '''
_______
---' ____)
(_____)
(_____)
(____)
---.__(___)
'''
paper = '''
_______
---' ____)____
______)
_______)
_______)
---.__________)
'''
scissors = '''
_______
---' ____)____
______)
__________)
(____)
---.__(___)
'''
import random
# 0 1 2
options = [rock, paper, scissors]
user_ans = int(input("What do you choose? Type 0 for Rock, 1 for Paper or 2 for Scissors.\n"))
user_ans2 = options[user_ans]
comp_ans = random.randint(0, 2)
comp_ans2 = options[comp_ans]
print(f"You chose: {user_ans2}")
print(f"Computer chose: {comp_ans2}")
rock == 0
paper == 1
scissors == 2
if user_ans2 == comp_ans2:
print("You Drew!")
elif user_ans2 == 0 and comp_ans2 == 1:
print("You lose!")
elif user_ans2 == 0 and comp_ans == 2:
print("You won!")
elif user_ans2 == 1 and comp_ans2 == 0:
print("You won!")
elif user_ans2 == 1 and comp_ans == 2:
print("You lost!")
elif user_ans2 == 2 and comp_ans2 == 0:
print("You lost!")
elif user_ans2 == 2 and comp_ans == 1:
print("You won!")
#๐ It wont print out the text in "print". Just prints the "image"
5 messages ยท Page 1 of 1 (latest)
@runic knot
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Closes after a period of inactivity, or when you send !close.
In some places you're comparing comp_ans (the index) with user_ans2 (the image)
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.