Midterm 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. Linux
    1. File system
    2. Shells
    3. Processes

  2. Basics of programming
    1. Syntax errors, semantic errors
    2. Programming in Python
      1. IDLE
      2. Comments

  3. Basics of Python
    1. Variable names
    2. Keywords
    3. Data types (integer, float, string, boolean)

  4. Statements and expressions
    1. Assignments (including simultaneous assignments)
    2. Arithmetic operators; precedence
    3. String operators
    4. Logical operators
    5. Relational operators and Boolean values
    6. Type conversion functions (int, float, str, bool)

  5. Input and output
    1. input built-in function
    2. print built-in function; end= in the print function
    3. Formatted printing

  6. Loops
    1. for loop; range()
    2. while loop

  7. Conditional statements
    1. if
    2. if ... else
    3. if ... elif ... else
    4. Nested ifs

  8. Functions
    1. Defining them
    2. Parameter lists and how they work
    3. Returning a value; return statement
    4. Parameters and arguments
    5. Scope (local vs. global, etc.)

  9. Sequences
    1. Strings, string operations (+, *), string methods
    2. Mutable vs. immutable
    3. Indexing (var[position])
    4. Slicing (var[start:end])
    5. Membership (in)

  10. Exceptions
    1. Interpreting error messages
    2. Catching them (try ... except ... else ... finally)
    3. Common exceptions


UC Davis seal
Matt Bishop
Office: 2209 Watershed Science
Phone: +1 (530) 752-8060
Email: mabishop@ucdavis.edu
You can also obtain a PDF version of this.
Version of January 28, 2019 at 11:39AM