Final Study Guide

This is simply a guide of topics that I consider important for the midterm. I don’t promise to ask you about them all, or about any of these in particular; but I may very well ask you about any of these, as well as anything we discussed in class, in the discussion section, or that is in the text.

  1. Basics of programming
    1. Compiler, interpreter
    2. Programming languages: high-level, low-level
    3. Syntax errors, semantic errors
    4. Debugging
    5. Programming in Python
      1. IDLE
      2. Comments
  2. Basics of Python
    1. Variable names
    2. Keywords
    3. Data types (integer, float, string, boolean)
  3. Assignments
  4. Statements
  5. Expressions
    1. Arithmetic operators; precedence
    2. String operators
    3. Logical operators
    4. Relational operators and Boolean values
    5. Type conversion functions (int, float, str)
    6. Input
  6. Input and output
    1. input functions
    2. print function
  7. Loops
    1. for loop
    2. range function
    3. while loop
  8. Conditional statements
    1. if
    2. if/else
    3. if/elif/else
    4. Nested ifs
  9. Functions
    1. Defining them
    2. Parameter lists and how they work
    3. Returning a value
    4. return statement
  10. Interpreting error messages
  11. Sequences
    1. Strings, string operations (+, *), string methods
    2. Lists, list operations (+, *), list methods
    3. Indexing (var[position])
    4. Slicing (var[start:end])
    5. Membership (in)
    6. References, aliasing
  12. Dictionaries
    1. What it is
    2. Methods for dictionaries
    3. How to use a dictionary
  13. Functions
    1. Parameters and arguments
    2. Scope (local vs. global, etc.)
    3. Returning values
    4. Call stack
    5. Recursion
    6. Memos in recursive functions
  14. File I/O and the File System
    1. Opening and closing files
    2. Reading and writing files
    3. Path names, file names
    4. Functions to manipulate them
  15. Exceptions
    1. Catching them (try ... except ... else ... finally)
    2. Throwing them (raise)
    3. Common exceptions

A PDF version is available here.
ECS 10, Basic Concepts of Computing
Winter Quarter 2012