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')