ifunker

Members
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

109 Neutral

About ifunker

  • Rank
    Newbie
  1. Rock Paper Scissors Lizard Spock in Python

    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]
  2. I just registered for 6.00x Introduction to Computer Science and Programming through @edxonline: http://t.co/FGm63aOw