IT 117: Intermediate Scripting
Class 20 Ungraded Quiz

  1. What does Python call the process by which an object can be stored as a file on disk?


  2. If you want to turn an object into a file on disk, what statement must you have at the top of the script file?


  3. What access mode would you use to open a pickled file for reading?


  4. Write a Python statement that opens the pickle file students.pk for reading and assigns the result to the variable pickle_file.


  5. Write the name of the method you would use to read data from a pickle file.


  6. What access mode would you use to open a pickled file for writing?


  7. Write a Python statement that opens the pickle file students.pk for writing and assigns the result to the variable pickle_file.


  8. Write the name of the method you would use to write data to a pickle file.


  9. If you have an import statement in a file defining the class, where must that statement appear?


  10. If you have a statement defining a global variable in a file defining the class, where must that statement appear?