So I got my Python book on Friday, and decided to start trying to work my way through it, yesterday I wrote my first program.. Well, ok, it was my second. My first program was a bit to easy to bother with covering here.. It was print “Hello World!” and that was it. Just like starting to learn any new language. :) I also learned that the Python Programming Language is named after Monty Python. Which I guess I sort of knew, but it was interesting to discover that was the case for sure. Anyways. Here is my first script even close to a real program!

#!/usr/bin/python2.4
# Make a variable called name, and have the user input what it is equal to
name = raw_input(“What is your name?”)
# Greet the person by name using the variable we collected
print “Hello, ” + name + “!”
# Make the screen pause and wait for input so it does not close the minute it is finished.
raw_input(“Press <enter> “)

Written on September 9th, 2006 , Programming

An average American 40 something guy.. is proudly powered by WordPress and the Theme Adventure by Eric Schwarz
Entries (RSS) and Comments (RSS).

An average American 40 something guy..

Views from an average American 40 something guy..