diff --git a/lab-02/problem-02.py b/lab-02/problem-02.py index c622444..0198030 100644 --- a/lab-02/problem-02.py +++ b/lab-02/problem-02.py @@ -1,4 +1,2 @@ -""" -Problem 2: Write a Python program that prompts the user to input an integer and raises a ValueError exception if the -input is not a valid integer. -""" \ No newline at end of file +# Problem 2: Write a Python program that prompts the user to input an integer and raises a ValueError exception if the +# input is not a valid integer. diff --git a/lab-02/problem-03.py b/lab-02/problem-03.py new file mode 100644 index 0000000..43f99f2 --- /dev/null +++ b/lab-02/problem-03.py @@ -0,0 +1 @@ +# Write a Python program that opens a file and handles a FileNotFoundError exception if the file does not exist. \ No newline at end of file diff --git a/lab-02/problem-04.py b/lab-02/problem-04.py new file mode 100644 index 0000000..2ce7773 --- /dev/null +++ b/lab-02/problem-04.py @@ -0,0 +1,2 @@ +# Write a Python program that prompts the user to input two numbers and raises a TypeError exception if the inputs are +# not numerical. \ No newline at end of file diff --git a/lab-02/problem-05.py b/lab-02/problem-05.py new file mode 100644 index 0000000..2481a98 --- /dev/null +++ b/lab-02/problem-05.py @@ -0,0 +1 @@ +# 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 diff --git a/lab-02/problem-06.py b/lab-02/problem-06.py new file mode 100644 index 0000000..2b2b019 --- /dev/null +++ b/lab-02/problem-06.py @@ -0,0 +1,2 @@ +# Write a Python program that executes an operation on a list and handles an IndexError exception if the index is out +# of range. \ No newline at end of file diff --git a/lab-02/problem-07.py b/lab-02/problem-07.py new file mode 100644 index 0000000..8a3b006 --- /dev/null +++ b/lab-02/problem-07.py @@ -0,0 +1,2 @@ +# Write a Python program that prompts the user to input a number and handles a KeyboardInterrupt exception if the user +# cancels the input. \ No newline at end of file diff --git a/lab-02/problem-08.py b/lab-02/problem-08.py new file mode 100644 index 0000000..906ff22 --- /dev/null +++ b/lab-02/problem-08.py @@ -0,0 +1 @@ +# Write a Python program that executes division and handles an ArithmeticError exception if there is an arithmetic error \ No newline at end of file diff --git a/lab-02/problem-09.py b/lab-02/problem-09.py new file mode 100644 index 0000000..6f8518e --- /dev/null +++ b/lab-02/problem-09.py @@ -0,0 +1 @@ +# Write a Python program that opens a file and handles a UnicodeDecodeError exception if there is an encoding issue. \ No newline at end of file diff --git a/lab-02/problem-10.py b/lab-02/problem-10.py new file mode 100644 index 0000000..c9a27fb --- /dev/null +++ b/lab-02/problem-10.py @@ -0,0 +1,2 @@ +# Write a Python program that executes a list operation and handles an AttributeError exception if the attribute does +# not exist. \ No newline at end of file