I'm trying to create a very simple rock/paper/scissors game (I'm new to python) and I am trying to understand why the result of the code below always results to "It's a draw". When using the boolean 'and' operator in my code I would think that when both conditions are met it would print "You win". Why doesn't it, what am I missing? I have looked at documentation here and google using conditional statements and from what I have found I am using them correctly but apparently not...
rock = '''
_______
---' ____)
(_____)
(_____)
(____)
---.__(___)
'''
paper = '''
_______
---' ____)____
______)
_______)
_______)
---.__________)
'''
scissors = '''
_______
---' ____)____
______)
__________)
(____)
---.__(___)
'''
import random
test_seed = int(input("Create a seed number: "))
random.seed(test_seed)
human_choice = input("What do you choose? Type 0 for rock, 1 for paper or 2 for scissors. ")
computer_choice = random.randint(0, 2)
if human_choice == 0:
print(rock)
elif human_choice == 1:
print(paper)
else:
print(scissors)
print("Computer chose:")
if computer_choice == 0:
print(rock)
elif computer_choice == 1:
print(paper)
else:
print(scissors)
if human_choice == 0 and computer_choice == 2:
print("You win.")
elif human_choice == 1 and computer_choice == 0:
print("You win.")
elif human_choice == 2 and computer_choice == 1:
print("You win.")
elif computer_choice == 0 and human_choice == 2:
print("You lose.")
elif computer_choice == 1 and human_choice == 0:
print("You lose.")
elif computer_choice == 2 and human_choice == 1:
print("You lose.")
else:
print("It's a draw.")