Here is a quick summary of Python topics that you should be reviewing for the final exam.

  1. Programming Mechanics
    1. Functions (what are they, using them, arguments, return values, etc)
    2. Variables (what are they, creating them, using them, naming rules, etc)
    3. Reading input from the keyboard with the input() function
  2. Math Expressions
    1. Writing math expressions
    2. Evaluating math expressions
    3. Storing & printing the results of math expressions
  3. Data Types
    1. Strings
    2. Numeric data types
      1. Integers (int)
      2. Floating point numbers (float)
    3. The Boolean data type
    4. The List data type
    5. Mixed type expressions
    6. Type conversion (string to int, int to strings, etc)
  4. Basic String Manipulation
    1. Combining two strings (concatenation)
    2. Multiplying a string (x = 'hi' * 5)
    3. Case manipulation (x = str.lower('JaSOn') # converts the string literal 'JaSOn' to 'jason)
    4. Calculating string length using the len() function
  5. Selection Statements
    1. The structure of an IF statement (IF keyword, condition, colon, indentation)
    2. Writing a condition for an IF statement
    3. Boolean operators (<, >, ==, !=, >=, <=)
    4. Comparing numeric values using Boolean expressions
    5. Comparing string values using Boolean expressions
    6. Using the IF-ELSE statement
    7. Nesting decision structures (IF statements inside other IF statements)
    8. The IF-ELIF-ELSE statement
    9. Logical operators (and, or, not)
  6. Generating random numbers using the random.randint() function
  7. Condition Controlled Loops (while loops)
    1. mechanics & how they work
    2. setting up conditions for a while loop
    3. infinite loops and how to avoid them
    4. sentinels (defining a value that the user enters that causes the loop to end)
    5. input validation loops (asking the user to continually enter a value until that value matches some condition)
  8. Accumulator variables
    1. setting up and using accumulator variables
    2. self referential assignment statements (i.e. counter = counter + 1)
    3. augmented assignment operators (i.e. counter += 1)
  9. Count Controlled Loops (for loops)
    1. mechanics and how they work
    2. iterating over a list (i.e. for x in [1,2,3,4,5]:)
    3. using the target variable in a for loop
    4. nested loops (i.e. loops inside of other loops)
  10. Functions
    1. mechanics and how functions work
    2. the "black box" model
    3. function definitions
    4. arguments
    5. return values
    6. calling a function
    7. local variables (variables that are defined inside a function and can only be accessed inside that function)
    8. passing arguments to your own functions
    9. writing a value returning function (i.e. using the 'return' keyword to send a result from your function to the part of your program that called that function)
  11. Lists
    1. Simple Variables vs. Lists (simple variables can only hold one piece of data, but lists can hold multiple values) – you can think of a list like a "book" and a variable like a "sheet of paper"
    2. Defining lists in Python (i.e. mylist = [1,2,3])
    3. Concatenating lists with the "+" operator
    4. Repeating lists with the "*" operator
    5. Referencing list items using index notation (i.e. mylist[0])
    6. Iterating through a list using a "while" loop
    7. Iterating through a list using a "for" loop
    8. Using the len() function to determine the # of items in a list
    9. Updating the value of an item in a list using bracket notation
    10. Creating empty lists
    11. Finding an item in a list using the "in" operator
    12. Adding items to a list using the append method
    13. Sorting items in a list using the sort method
    14. Reversing items in a list using the reverse method
    15. Finding the position of an item in a list using the index method
    16. Inserting an item in a list at a specific index using the insert method
    17. Finding the largest and smallest values in a list using the min and max methods
    18. Totaling the values of all elements in a list using an accumulator variable
    19. Removing an item from a list using the remove method
  12. Strings Manipulation
    1. Iterating through all characters in a string using a for loop
    2. Indexing a specific character in a string using bracket notation
    3. Iterating through all characters in a string using a while loop
    4. String immutability (you can't change a string using bracket notation like you would change a list element)
    5. Testing a string for substrings using the "in" operator
    6. Detecting character types in a string using the built-in string testing methods (isdigit, isalpha, isalnum, islower, isupper, isspace)
    7. Splitting a string into a list using the "split" method
  13. File Input & Output
    1. Opening a file for reading