You are now ready to begin your adventure into the world of Python programming. The first step is to install Python on your computer. Please follow the steps in the first few paragraphs in the background information to accomplish this installation.
Python is a language which can be run as an interpreted language, as a script language or as a compiled language. At Google, python is one of the 3 “official languages” alongside with C and Java. Official here means that Googlers are allowed to deploy these languages to production services. Here you can read some more about Python and its current development.
Python at Google, Retrieved September 2012 from: http://quintagroup.com/cms/python/google
In this module you will work with the Python Interpreter and Python Scripts. You should create your Python program by opening Python IDLE, choose File > New Window. Then you can write your own code or cut/paste existing codes from other sources (like tutorials). Make sure to save the code as .py file. If there exists .py file, then simply File > open. Run the program by clicking on the menu Run > Run Module F5.
Your first programming assignment is about variables, expressions, statements and conditionals
- Read chapter 2 ( variable, expressions and statements) and 5 (Conditionals, only 5.1 through 5.7) in the online book of “Think Python: How to Think Like a Computer Scientist (Version 1.3.3)” http://www.greenteapress.com/thinkpython/thinkpython.pdf. Run all the examples and exercises in CH2, the examples 5.1 through 5.7 in CH5.
- Read the Instant Hacking tutorial in the background readings and Try the examples of Hello World, Area of a Rectangle, Feedback, and Flow. Run all the examples and exercises.
(a common mistake that occurs is that when you cut/paste the code directly from the tutorial, there will be extra empty spaces before certain lines, then you will encounter a syntax error message “unexpected indent” when you run the program. Fix the problem by deleting the extra indent.)
When you’ve done, insert all of the various program files into a single zip file and upload them to coursenet. Include a brief summary document in Word which explains what you have accomplished.
If you would like to know what students who took this class in the past said, please check here.
Case assignment expectations:
- Provide all the required program files.
- Provide a brief summary document discussing what you have accomplished.