lease use the 4 functions in the starter code, thank you! 1. Format your code as provided in the Lab 2 Start Code provided below. 2. The user prompt for a size will be: "Please input your staircase size:" 3. Perform a function call within the exception handling logic (Your function that contains the code to run the program should be within a try/except block - see comments in the starter code). 4. Raise and Handle the following exceptions: - A custom exception called "IntegerOutOfRangeException" when the user provides an integer value that is not within the valid integer range. ("That staircase size is out of range.") - A custom exception called "NoStairCaseException" when the user provides a staircase size of 0. ("There are no steps in the staircase.") - In ValueError for user input that are not integers. ("There are no steps in the staircase.") 5. The error messages for the above exceptions should be the same as above and printed to the shell. 6. The program should continue to run and request a new input until the user types the word "DONE"
Please use the 4 functions in the starter code, thank you!
1. Format your code as provided in the Lab 2 Start Code provided below.
2. The user prompt for a size will be: "Please input your staircase size:"
3. Perform a function call within the exception handling logic (Your function that contains the code to run the
4. Raise and Handle the following exceptions:
- A custom exception called "IntegerOutOfRangeException" when the user provides an integer value that is not within the valid integer range. ("That staircase size is out of range.")
- A custom exception called "NoStairCaseException" when the user provides a staircase size of 0. ("There are no steps in the staircase.")
- In ValueError for user input that are not integers. ("There are no steps in the staircase.")
5. The error messages for the above exceptions should be the same as above and printed to the shell.
6. The program should continue to run and request a new input until the user types the word "DONE"
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images