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!)
http://www.python.org/download/releases/2.6/
2. NEVER BE AFRAID TO SEARCH THE DOCUMENTATION!!!!
http://docs.python.org/2.6/index.html
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!)
http://www.slideshare.net/ahmetbulut/programming-with-python-week-1
http://www.slideshare.net/ahmetbulut/programming-with-python-week-2
http://www.slideshare.net/ahmetbulut/programming-with-python-week-3
http://www.slideshare.net/amiable_indian/introduction-to-python
http://www.slideshare.net/amiable_indian/introduction-to-python-part-two
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!'''
My friend Nate told me about this great site where you can do python tutorials free and easy. Check it out!
ReplyDeletehttp://pythonmonk.com/
Harlan,
ReplyDeleteI'm reading a book called "Mining The Social Web" right now that sets up a virtual machine on any system that then hosts an iPython notebook server to demonstrate the code and make a uniform Python IDE across all readers' machines. The virtual machine also hosts a MongoDB installation for later chapter that gather a ton of data.
Would any part of this (iPython, especially) be helpful for your education efforts?
http://miningthesocialweb.com/
Yes, definately, thanks for sharing!
ReplyDeleteHarlan