Exam 6: Files and Exceptions

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

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:
Verified

Text

Which step creates a connection between a file and a program?

Free
(Multiple Choice)
4.8/5
(75)
Correct Answer:
Verified

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:
Verified

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)

What happens when a piece of data is written to a file?

(Multiple Choice)
4.8/5
(76)

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
close modal

Filters

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