අන්තර්ගතයට යන්න
mcqdinethlive

Unit 9, Programming

9.11 File & Database Handling

This lesson introduces foundational file handling operations within a programming language like Python. Students learn how to connect a computer program to external text files to perform essential file operations such as opening, reading, writing, appending, and closing files to manage and persist data.

ප්‍රධාන සංකල්ප

ගොනු හැසිරවීම (File Handling)
The process of connecting a computer program to external files to perform operations such as reading data from them, writing data to them, and saving changes.
ගොනුවක් විවෘත කිරීම (Opening a File)
The initial step in file handling where a program establishes a connection to a specific text file, preparing it for reading, writing, or appending.
ගොනුවක් කියවීම (Reading a File)
The operation of retrieving and accessing pre-existing data stored inside a text file using a computer program.
ගොනුවකට ලිවීම (Writing to a File)
The operation of saving new data into a file, which typically overwrites existing content or creates a new file if it does not exist.
ගොනුවකට එක් කිරීම (Appending to a File)
The process of adding new data to the end of an existing file without deleting or overwriting its current content.
ගොනුවක් වසාදැමීම (Closing a File)
The final step in file operations that breaks the program's connection to the file, saving changes and releasing system resources.

MCQ කට්ටල

MCQ 12

විභාගයේදී

  • Writing Python code snippets to open, read, write, and close text files.
  • Identifying the correct file opening modes (r, w, a) in structured programming questions.
  • Explaining the importance of closing files in structured/essay questions.
  • Debugging simple programs that interact with external text files.