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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!