File: task1_file_handling.py
This program performs the following:
- Opens and reads a text file named
sample.txt. - Prints its content line by line.
- Handles the case where the file does not exist and displays a user-friendly error message.
File: task2_write_append.py
This program:
- Takes user input and writes it to a file named
output.txt. - Appends additional predefined or user-provided data to the same file.
- Reads and displays the final content of the file.