From 64c150cb7846708ce0b6b2391c5e493a06af11bc Mon Sep 17 00:00:00 2001 From: baphim <269010393+baphim@users.noreply.github.com> Date: Sun, 13 Sep 2026 16:18:06 -0400 Subject: [PATCH] feat: began problem-05 and created filename2.txt as reference for said problem. --- lab-02/filename2.txt | 0 lab-02/problem-05.py | 7 ++++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 lab-02/filename2.txt diff --git a/lab-02/filename2.txt b/lab-02/filename2.txt new file mode 100755 index 0000000..e69de29 diff --git a/lab-02/problem-05.py b/lab-02/problem-05.py index 2481a98..6a6b72d 100644 --- a/lab-02/problem-05.py +++ b/lab-02/problem-05.py @@ -1 +1,6 @@ -# Write a Python program that opens a file and handles a PermissionError exception if there is a permission issue. \ No newline at end of file +# Write a Python program that opens a file and handles a PermissionError exception if there is a permission issue. + +try: + open('filename2.txt') +except PermissionError: + print('Insufficient file permissions')