Wednesday, November 27, 2013

Rock Paper Scissors Lizard Spock

       So I'm enrolled in a Python programming course on Coursera and just finished my first project! I haven't really been working on this class due to my time constraints from my actual classes at Brown and from sailing, but now that I'm on break I thought I would give it a shot. The program is really simple: it plays a round of Rock-Paper-Scissors (just realized my code uses the word "Scizzors" not scissors, really need to work on my spelling)-Lizard-Spock with you.
       For those who don't know RPSLS is an expansion of rock paper scissors made popular by the T.V show The Big Bang Theory. I used Code Skulptor to write and execute my code, and it's saved through their website. To play a game of RPSLS, just scroll down to the end of the script. At the bottom there is a line that says:
rpsls("Spock") 
     To play the game just replace "Spock" with any of the 5 words (or just leave it as Spock). This is what you choose to throw. Then click the run button, which is a triangle shaped button in the upper left corner. The computer will randomly pick one of the five throws and show you who won.

Not the coolest thing in the world but it's a start.
Here's the link:

http://www.codeskulptor.org/#user26_SeeLm0xDrq_2.py

No comments:

Post a Comment