Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MCQ 1: MCQ 2: please answer When is else block executed in try, except, else scenario? Check all that applies. when there is no error

MCQ 1:

image text in transcribed

MCQ 2:

image text in transcribed

please answer

When is else block executed in try, except, else scenario? Check all that applies. when there is no error occurred in try block if the code does not enter into except block if the code enters in except block if there occurs any error in try block try: num1 = int(input('enter a number')) num2 int(input('enter another number ')) print (numlum2) except Exception: print('Some Exception', end='||') except ValueError: print('enter integer', end="11) except ZeroDivisionError: print('2nd number cannot be zero", end='11') except TypeError: print('number was not provided", end="||') O Some Exception|| O Some Exception|2nd number cannot be zero|| enter integer number was not provided 2nd number cannot be zero||

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions