I'm trying to print draw if players and computer choose the same variable, It can not printing if both statements are the same at the moment it just ends after the computers choice and ignores the if statement
rock = '''
_______
---' ____)
(_____)
(_____)
(____)
---.__(___)
'''
paper = '''
_______
---' ____)____
______)
_______)
_______)
---.__________)
'''
scissors = '''
_______
---' ____)____
______)
__________)
(____)
---.__(___)
'''
#Write your code below this line
players_choice = input("What do you choose? Type 0 for Rock, 1 for Paper or 2 for Scissors. ")
if players_choice == "0":
print(rock)
elif players_choice == "1":
print(paper)
elif players_choice == "2":
print(scissors)
import random
print("Computer chooses:")
computer_options = [rock, paper, scissors]
computer_choice = random.choice(computer_options)
print(computer_choice)
if computer_choice == players_choice:
print("Draw")
Currently, you are comparing the players_choice which can be "0", "1" or "2" with computers choice that can be rock, paper or scissors,
That's why it can never be equal and can print Draw.
So simply you can set players_choice to something like below in your if, else blocks
So then this comparison will make more sense;
Complete Updated Snippet: