CS107 Test 2 Review

Topics

Chapter 3

  • For loops through lists
  • Tuples
  • list comprehension
  • List Slicing
  • Nested loops
  • Nested lists

Chapter 4

  • Functions
  • Arguments
  • Local variables
  • Global variables
  • return values
  • if statements
  • elif clause
  • else clause
  • Default arguments
  • docstrings

Other

  • importing your own python files.
  • Using nested lists as a data set.
  • list() function
  • map() function

Possible Question Types

  • Calculate values and print them.
  • Fix an error in the code.
  • Complete incomplete code.
  • Write a function.
  • Call functions with different arguments.
  • Write if/elif/else statements
  • Write python to answer a question about data.

Test Format (Same as test 1)



Clif Presser<cpresser@gettysburg.edu>
Last modified: Tue Nov 1 14:52:13 EDT 2022