Exam 6: Files and Exceptions
Exam 1: Introduction to Computers and Programming36 Questions
Exam 2: Input, Processing, and Output35 Questions
Exam 3: Decision Structures and Boolean Logic35 Questions
Exam 4: Repetition Structures34 Questions
Exam 5: Functions and Modules69 Questions
Exam 6: Files and Exceptions34 Questions
Exam 7: Lists and Tuples35 Questions
Exam 8: More About Strings35 Questions
Exam 9: Dictionaries and Sets35 Questions
Exam 10: Classes and Object Oriented Programming35 Questions
Exam 11: Inheritance35 Questions
Exam 12: Recursion35 Questions
Exam 13: GUI Programming35 Questions
Select questions type
A(n) _______________ file contains data that has been encoded as text, using a scheme such as ASCII.
Free
(Short Answer)
4.9/5
(93)
Correct Answer:
Text
Which step creates a connection between a file and a program?
Free
(Multiple Choice)
4.8/5
(75)
Correct Answer:
A
It is possible to create a while loop that determines when the end of a file has been reached.
Free
(True/False)
4.8/5
(87)
Correct Answer:
True
A(n) _______________ access file retrieves data from the beginning of the file to the end of the file.
(Short Answer)
4.7/5
(77)
A(n) _____ access file is also known as a direct access file.
(Multiple Choice)
4.8/5
(92)
A filename _______________ is a short sequence of characters that appear at the end of a filename preceded by a period.
(Short Answer)
4.7/5
(79)
When a piece of data is read from a file, it is copied from the file into the program.
(True/False)
4.8/5
(87)
What do you call the process of retrieving data from a file?
(Multiple Choice)
4.8/5
(87)
A(n) _______________ file contains data that has not been converted to text.
(Short Answer)
4.8/5
(82)
A(n) _______________ includes one or more statements that can potentially raise an exception.
(Short Answer)
5.0/5
(80)
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.
(True/False)
5.0/5
(84)
The term _______________ file is used to describe a file from which the program gets data.
(Short Answer)
4.9/5
(78)
In Python, there is nothing that can be done if the program tries to access a file to read that does not exist.
(True/False)
4.7/5
(92)
Assume that the customer file references a file object, and the file was opened using the 'w' mode specifier. How would you write the string 'Mary Smith' to the file?
(Multiple Choice)
4.8/5
(85)
Which mode specifier will erase the contents of a file if it already exists and create it if it does not exist?
(Multiple Choice)
4.9/5
(86)
Which of these is associated with a specific file and provides a way for the program to work with that file?
(Multiple Choice)
4.9/5
(79)
What type of file access jumps directly to any piece of data in a file without reading the data that came before it?
(Multiple Choice)
4.9/5
(87)
Python allows the programmer to work with text and number files.
(True/False)
4.8/5
(80)
When a program needs to save data for later use, it writes the data in a(n) _______________.
(Short Answer)
4.7/5
(82)
Showing 1 - 20 of 34
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)