Answered step by step
Verified Expert Solution
Question
1 Approved Answer
4 . Wrap the code inside the main do another? loop of your last program with a try block. 5 . Add three except blocks.
Wrap the code inside the main do another? loop of your last program with a try block.
Add three except blocks.
a The first will catch a TypeError exception and display Wrong data type!
b The second will catch an NameError and display a message that makes sense.
c The third will catch a generic Exception along with its object e and display the message Something went wrong: e so that the error message e is displayed.
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