Question: Python class: 1. Write a Python script which asks the user to input 2 numbers (a & b). 2. Assign variable quotient a / b
Python class:
1. Write a Python script which asks the user to input 2 numbers (a & b).
2. Assign variable quotient a / b and power a ** b.
3. Use try/except blocks to print error messages for:
a.) Division by zero Error: Cannot divide by zero.
b.) Over flow Error: a**b is too large.
Look up the proper exception names for each case above. Hint: Use 2 separate try/except blocks. Hint 2: Integers cannot return an over flow exception. Convert a and b to floats.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
