QZ02 Concepts


Quiz 2 Concepts

  • Quiz 0 + 1 Concepts plus:
  • LS12: Lists
    • Basic list syntax and typing
    • Indexing on lists and updating values at an index (subscription notation)
    • len() function
    • methods: .append() and .pop()
  • LS13: Relative Reassignment Operators
    • Understanding i = i + 1 is functionally equivalent to i += 1
    • Knowing how to use all relative reassignment operators: +=, -=, *=, /=, %=, //=, **=
  • LS14: Importing Modules
    • Knowing basic import syntax: from <package-name> import <module-name> and from <package-name>.<module-name> import <function>
    • Knowing how to handle if __name__ == "__main__": in a memory diagram
  • CL05: Lists in Memory
    • Memory Diagrams with lists
    • Writing functions with lists (both modifying existing lists or creating new lists)
  • LS17: Scope
    • Applying scope to memory diagrams in terms of function call frames
    • Using the global keyword
  • CL06: for loops
    • Using for ... in ... syntax in memory diagrams and writing functions
    • Using for ... in range(...) syntax in memory diagrams and writing functions
  • LS 19: Dictionaries
    • Basic list syntax and typing
    • Accessing, adding, and modifying values at an index (subscription notation)
    • function: len()
    • method: .pop()
    • using the booling expression: elem in dictionary
  • LS20: Dicts in Memory + for Loops
    • Memory Diagrams with for loops
    • Using a for loop to iterate through a dictionary’s keys
Contributor(s): Alyssa Byrnes