So, which language should you learn? My opinion: Python! Specifically Python 2.6. I will be posting here in my blog a mini-series of how to learn python. This is part 1 of 4: Basic Python
Python Basics "Hello World", If I am Cool, "Hello World", Forever "Hello World", 100 "Hello Worlds".
This whole thing should take you no more than 30 minutes....
1. Download and install python for your MAC or PC: (just use the installer!)
2. NEVER BE AFRAID TO SEARCH THE DOCUMENTATION!!!!
3. Breeze through a few of these Python Training Slides.. (just go through quickly.... you only learn programming by doing... so go do #4 ASAP!)
4. Do the following code in a file for practice... and do the homework below.
print "hello world"a=1print aa="b"print ab=5print ba=bprint amessage="harlan is cool"cool=Trueif cool:print messagecool=not coolif cool:print messagecool=not coolif cool:print messagedancer=Trueif cool and dancer:print messageif cool or dancer:print message#while True:# print "hello world"#for i in range(1,101):#print i, "hello world"name=raw_input("what is your name?")print "hello %s" % namenumber=raw_input("how old are you?")if int(number) < 5:print "you are younger than 5"elif int(number) < 25:print "you are younger than 25"else:print "you are older than 25"'''HomeworkDue by next week... write a program that prints ___ is an even number...for every number from 1 to 1000.. then asks user to put in any numberchecks if it is even, and if so.. prints __ is an even numberif not prints ___ is NOT an even number.* bonus points if you handle 0 correctly!'''