player_number=name_to_number(name)
player_number=int ()
# compute random guess for comp_number using random.randrange()
comp_number=random.randrange (0,4)
# compute difference of player_number and comp_number modulo five
rpsls_match = (player_number-comp_number)%5
# use if/elif/else to determine winner
if rpsls_match == 1 or 2:
rpsls_winner = 'Player wins!'
elif rpsls_match == 3 or 4:
rpsls_winner = 'Computer wins!'
else:
rpsls_winner = 'Player and computer tie!'
#print "Player chooses " + name
# convert comp_number to name using number_to_name
print 'Computer chooses ', number_to_name(comp_number),comp_number
print 'player chooses ' , name, player_number
return rpsls_winner
Code run correctly but i did not get answer what i want,, it give me answer like
Computer chooses paper 2
player chooses rock 0
Player wins!
Computer chooses lizard 3
player chooses paper 0
Player wins!
Computer chooses spock 1
player chooses scissors 0
Player wins!
Computer chooses paper 2
player chooses lizard 0
Player wins!
incorrect input
Computer chooses lizard 3
player chooses Spock 0
Player wins!
but I want like
Player chooses rock
Computer chooses scissors
Player wins!
Player chooses Spock
Computer chooses lizard
Computer wins!
Player chooses paper
Computer chooses lizard
Computer wins!
Player chooses lizard
Computer chooses scissors
Computer wins!
Player chooses scissors
Computer chooses Spock
Computer wins!