Posts

Showing posts with the label coding

Coding contest.

Image

Escaping from a mistake?

Image

Im bugged.

Image

Rock, paper, or scissors.

Game of Rock, paper, or scissors. Should be able to run on any platform that can support the Python interpreter. $ python rps.py or c:/[pythondirectory]> python rps.py rps.py [code] import random import sys def makeYourChoice():     print "Press R for Rock"     print "Press P for Paper"     print "Press S for Scissors"     print "Press Q to quit!"     userChoice = raw_input("What do you want to choose?").lower()          if userChoice == "r":         return "Rock"     if userChoice == "p":         return "Paper"     if userChoice == "s":         return "Scissors"     if userChoice == "q":         sys.exit(0)     else:         makeYourChoice() de...

Rock, paper, or scissors.

Game of Rock, paper, or scissors. Should be able to run on any platform that can support the Python interpreter. $ python rps.py or c:/[pythondirectory]> python rps.py rps.py [code] import random import sys def makeYourChoice():     print "Press R for Rock"     print "Press P for Paper"     print "Press S for Scissors"     print "Press Q to quit!"     userChoice = raw_input("What do you want to choose?").lower()          if userChoice == "r":         return "Rock"     if userChoice == "p":         return "Paper"     if userChoice == "s":         return "Scissors"     if userChoice == "q":         sys.exit(0)     else:      ...

Data mining.(updated).

Image
Ever wished you could get data from a web page without reading the whole web page, or for even just getting data from a server.   One thing I like to do is get the football scores. Find that SI.com and some other sites have so much going on it takes forever to navigate the pages. Not only that, you are subjected to all the ads. Just give me the scores so I can move on. Data mining allows me to do that.  In other words, the computer can be your personal secretary to get all the data you need for your special reports. without you having to do all that hard work and the extra time to be spent. Written a series of beginner guides for data mining. You can find them at. http://www.instructables.com/id/Data-mining/ Note:  The football score capturing script works best for the preceding week or earlier in the same season. Update: Let's take what we have learned already and apply it. Showed you how to extract data to make your own web page and also showed y...