मराठी

List the situation(s) in which the code may result in IOError?

Advertisements
Advertisements

प्रश्न

List the situation(s) in which the code may result in IOError?

लघु उत्तर
Advertisements

उत्तर

An IOError may occur when an input/output operation fails, for example:

  • Opening a file that does not exist in read mode.
  • Attempting to read a file without sufficient permission.
  • Attempting to write to a read-only file.
  • Writing when the disk is full.
  • Using an invalid file path or inaccessible device.
  • A hardware, network, or operating-system error during file access.

In modern Python, many such errors are represented by the more general OSError class.

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 8: Exception Handling & Generate Functions - EXERCISE [पृष्ठ १५८]

APPEARS IN

सीबीएसई Computer Science with Python [English] Class 12
पाठ 8 Exception Handling & Generate Functions
EXERCISE | Q 7. | पृष्ठ १५८
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×