Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualFunker

Posted 14 October 2012 - 03:10 PM

thanks bambambam


[source lang="python"]def rpsls(guess): import random player_number = name_to_number(guess) comp_number = random.randrange(0, 5) winner = (comp_number - player_number) % 5 print "" print "Player chooses " + number_to_name(player_number) print "Computer chooses " + number_to_name(comp_number) if winner == 1 or winner == 2: print "Computer wins!" elif winner == 0: print "Player and computer tie!" else: print "Player wins!"[/source]

#1Funker

Posted 14 October 2012 - 03:10 PM

thanks bambambam

[source lang="python"] print "" print "Player chooses " + number_to_name(player_number) print "Computer chooses " + number_to_name(comp_number) if winner == 1 or winner == 2: print "Computer wins!" elif winner == 0: print "Player and computer tie!" else: print "Player wins!"[/source]

PARTNERS