Exam 7: files and Exceptions
Exam 1: Introduction to Computers and Programming35 Questions
Exam 2: Input, Processing, and Output35 Questions
Exam 3: Simple functions34 Questions
Exam 4: Decision Structures and Boolean Logic35 Questions
Exam 5: Repetition Structures35 Questions
Exam 6: Value-Returning functions and Modules35 Questions
Exam 7: files and Exceptions35 Questions
Exam 8: Lists and Tuples35 Questions
Exam 9: More About Strings35 Questions
Exam 10: Dictionaries and Sets35 Questions
Exam 11: Classes and Object-Oriented Programming35 Questions
Exam 12: Inheritance35 Questions
Exam 13: Recursion35 Questions
Exam 14: GUI Programming35 Questions
Select questions type
What do you call the process of retrieving data from a file?
(Multiple Choice)
4.9/5
(41)
A(n) _______________ file contains data that has been encoded as text, using a scheme such as ASCII.
(Short Answer)
4.9/5
(38)
Which method could be used to convert a numeric value to a string?
(Multiple Choice)
4.7/5
(44)
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
(39)
It is possible to create a while loop that determines when the end of a file has been reache
(True/False)
4.8/5
(32)
Which mode specifier will open a file but will not let you change the file or write to it?
(Multiple Choice)
4.8/5
(33)
Which of these is associated with a specific file and provides a way for the program to work with that file?
(Multiple Choice)
4.7/5
(40)
If the last line in a file is not terminated with a \n, the readline method will return the line without a \n.
(True/False)
4.8/5
(41)
Programmers usually refer to the process of _______________ data in a file as "writing data to" the file.
(Short Answer)
4.7/5
(40)
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)
4.8/5
(41)
When a file has been opened using the 'r' mode specifier, which method will return the file's contents as a string?
(Multiple Choice)
4.8/5
(42)
A(n) _______________ file contains data that has not been converted to text.
(Short Answer)
4.7/5
(30)
An exception handler is a piece of code that is written using the try/except statement.
(True/False)
4.8/5
(38)
When a program needs to save data for later use, it writes the data in a(n) _______________.
(Short Answer)
4.8/5
(40)
Showing 21 - 35 of 35
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)