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!

# 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> “)

Bookmark the permalink.

Leave a Reply