This project demonstrates how to work with files and handle errors in Python.
It covers two parts:
- Reading a file and writing a modified version to a new file.
- Handling errors if the file doesn’t exist or can’t be read.
- Ask the user for a filename.
- Read the content of the file.
- Modify the content (in this example, convert all text to uppercase).
- Write the modified content to a new file named
modified_<original_filename>
.
- Handle errors if:
- The file does not exist.
- The program does not have permission to read the file.
- Any unexpected error occurs.
- Python