Session 2: Introduction to Python


Session 3 – Data structures, File I/O, and stock functions

  1. Concepts
    1. Lists and Dictionaries
    2. Reading from a file
    3. Calling functions
  2. Background/Overview
    1. Completed intro to Python. Can declare variables, use conditionals, some loops, and print to screen.
  3. Lesson Plan
    1. Lists
      1. Index’s start at zero, not one.
      2. How to create a list.
      3. What kinds of data can exist in a list?
      4. List methods.
        1. Append, count, index, remove, reverse, sort
    2. Dictionaries
      1. What’s the difference between a list and a Dictionary?
      2. Dictionary methods.
        1. Clear, get, has_key, items, keys, values
    3. File I/O
      1. Reading input from console
      2. File methods
        1. Open, readlines, in, write
        2. Closing
    4. All together
      1. Read text from a file, put the information into a Dictionary, print the Dictionary to consol.