answers graded A+ (12)
If a file with the specified name already exists when the file is opened and the file is opened in 'w' mode,
then an alert will appear on the screen. - correct answer ✔✔False
When a piece of data is read from a file, it is copied from the file into the program - correct answer
✔✔false
closing a file disconnects the communication between the file and the program - correct answer ✔✔true
In python, there is nothing that can be donee if the program tries to access a file to read that does not
exist - correct answer ✔✔false
Python allows the programmer to work with text and number files - correct answer ✔✔false
The ZeroDivisionError exception is raised when the program attempts to perform the calculation x/y if y
= 0 - correct answer ✔✔true
An exception handler is a piece of code that is written using the try/except statement - correct answer
✔✔true
if the last line in a file is not terminated with \n, the deadline method will return the line without the \n -
correct answer ✔✔true
Strings can be written directly to a file with the WRITE method, but the numbers must be converted to
strings before they can be written. - correct answer ✔✔true
It is possible to create a WHILE loop that determines when the end of a file has been reached - correct
answer ✔✔true
, Which of the following is associated with a specific file and provides a way for the program to work with
that file - correct answer ✔✔the file object
What is the process of retrieving data from a file called - correct answer ✔✔reading data
which of the following describes what happens when a piece of data is written to a file - correct answer
✔✔the data is copied from a variable in RAM to a file
Which steep creates a connection between a file and a program - correct answer ✔✔open the file
How many types of files are there - correct answer ✔✔two
A(n) _______ access file is also known as a direct access file - correct answer ✔✔random
Which type of file access jumps directly to a piece of data in the file without having to read all the data
that comes before it - correct answer ✔✔random
A single piece of data within a record is called a - correct answer ✔✔field
Which mode specifier will erase the contents of a file it if already exists and create the file if it does not
already exist - correct answer ✔✔'w'
Which mode specifier will open a file but not let you change the file or write to it - correct answer ✔✔'r'
Which method could be used to strip specific characters from the end of a string - correct answer
✔✔rstrip
Which method could be used to convert a numeric value to a string - correct answer ✔✔str