Exam 7: files and Exceptions

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

What do you call the process of retrieving data from a file?

(Multiple Choice)
4.9/5
(81)

A(n) _______________ file contains data that has been encoded as text, using a scheme such as ASCII.

(Short Answer)
4.9/5
(79)

Which method could be used to convert a numeric value to a string?

(Multiple Choice)
4.7/5
(95)

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
(87)

It is possible to create a while loop that determines when the end of a file has been reache

(True/False)
4.8/5
(72)

Which mode specifier will open a file but will not let you change the file or write to it?

(Multiple Choice)
4.8/5
(80)

Which of these is associated with a specific file and provides a way for the program to work with that file?

(Multiple Choice)
4.8/5
(89)

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
(81)

Programmers usually refer to the process of _______________ data in a file as "writing data to" the file.

(Short Answer)
4.7/5
(86)

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
(80)

How many types of files are there?

(Multiple Choice)
4.9/5
(78)

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
(89)

A(n) _______________ file contains data that has not been converted to text.

(Short Answer)
4.8/5
(78)

An exception handler is a piece of code that is written using the try/except statement.

(True/False)
4.9/5
(92)

When a program needs to save data for later use, it writes the data in a(n) _______________.

(Short Answer)
4.8/5
(78)
Showing 21 - 35 of 35
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)