IT 117: Intermediate Scripting
Class 20 Ungraded Quiz
-
What does Python call the process by which an object can
be stored as a file on disk?
-
If you want to turn an object into a file on disk, what statement
must you have at the top of the script file?
-
What access mode would you use to open a pickled file for reading?
-
Write a Python statement that opens the pickle file
students.pk for reading
and assigns the result to the variable pickle_file.
-
Write the name of the method you would use to read data from a pickle file.
-
What access mode would you use to open a pickled file for writing?
-
Write a Python statement that opens the pickle file
students.pk for writing
and assigns the result to the variable pickle_file.
-
Write the name of the method you would use to write data to a pickle file.
-
If you have an import statement in a file defining the class, where
must that statement appear?
-
If you have a statement defining a global variable
in a file defining the class, where
must that statement appear?