Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started