CBSE Class 12 Computer Science Question 1 of 136

Data File Handling — Question 1

Back to all questions
1
Question

Question 1

Assertion (A): The file in Python is used to store information on a named location in the secondary storage device.

Reasoning (R): In Python, files are classified as program files and data files and as per the file type store the data specific to its use and purpose.

  1. Both A and R are true and R is the correct explanation of A.
  2. Both A and R are true but R is not the correct explanation of A.
  3. A is true but R is false.
  4. A is false but R is true.
Answer

Both A and R are true and R is the correct explanation of A.

Explanation
In Python, a file is used to store information on a named location in the secondary storage device. Files can be classified into different types such as program files and data files. Program files contain Python scripts (with .py extension), while data files store specific data relevant to their purpose. This classification helps organize and manage files based on their content and usage.