Skillshare intro to Python/Unit 1

From OpenHatch wiki
< Skillshare intro to Python
Revision as of 19:57, 9 June 2013 by imported>Jesstess

Goal #1: set up Python

First things first: we need to install Python! Please complete the instructions below for your operating system.

Goal #2: install a text editor

In addition to being able to run Python, we are going to install a good text editor for writing Python code.

If you would like to use a different text editor from the recommendation for your operating system, great! Just let me know so I can confirm that it'll work for this class.

Goal #3: practice terminal navigation

Throughout this class, we'll be running Python programs from the terminal, which means we'll want to be comfortable with navigating to those programs from the terminal prompt. In this section, we'll practice using these navigation commands.

Goal #4: reading and running Python files

We'll be practicing two skills with this goal. The first is reading and understanding Python programs. The second is running these programs from the terminal.

For each of the following Python programs (folks often call these "scripts"), please do the following:

  1. Download the script and save it to your Desktop.
  2. Open the script in your text editor.
  3. Read through the script. Don't worry about understanding every last detail. Instead focus on:
    • Overall, what does this script do?
    • What data structures are used? Where are the strings, integers, and floats?
    • What functions are used, and why?
  4. Once you have a good sense of what the script does, open a terminal, navigate to the directory where you saved the script, and run it. Does it do what you expected?
  5. Think about 1 way that you could extend the script. How would you make that change in code?