CBSE Class 12 Computer Science Question 119 of 136

Data File Handling — Question 7

Back to all questions
7
Question

Question 7

When we open a file in read mode, the given file must exist in the folder; otherwise, Python will raise FileNotFound error.

Answer

True

Reason — When a file is opened for reading using r mode (text files) or rb mode (binary files), if the file does not exist, Python will raise FileNotFound error.