Exam Topics

The following skills may be tested in the CSE 20 Testout Exam.


Python data structures: create and use lists, dictionaries, and sets. In particular:

  • Creating a list.

  • Appending, inserting, extending a list.

  • Iterating over a list.

  • List slicing.

  • Creating a dictionary.

  • Key lookup in a dictionary (possibly with a default value if the key is not found).

  • Iterating over the keys, and key/value pairs in a dictionary.

  • Creating sets

  • Membership in a set, union, intersection, difference between sets.


Control flow:

  • If / then / else.

  • For and while loops.

  • Break from a loop.

  • For loops containing either other for loops (thus, nested loops), or if-then-else.

  • assert statement.


Functions:

  • Defining a function.

  • Positional and named arguments.

  • Returning a value.


Modules:

  • Importing a module (from standard lib; no installation necessary).

  • Using a function from a module.


I/O: Students should be able to read/write to files simply.

  • Print function.

  • Open a file.

  • Read / write from file (simple).


Classes: Students should be able to define simple classes and create objects from them.

  • Defining a simple class.

  • Class initializer (__init__), object variables.

  • Defining simple methods.

  • Creating an object from a class.