Search Header Logo

python exception handling

Authored by uma maheswari

Computers

11th Grade

Used 44+ times

python exception handling
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When will the else part of try-except-else be executed?

always

when an exception occurs

when no exception occurs

never

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Can one except block handle multiple exceptions?

Yes

No

May be

Insufficient information

3.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

Exception handling in python is done using ___ blocks

try

except

else

finally

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Is the following Python code valid?

try:

# Do something

except:

# Do something

finally:

# Do something

Yes

No

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If there is an error in opening a file, which exception is raised ?

Index Error

IO Error

Import Error

Type Error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

To catch an exception during program execution, use the try except clause.

True

False

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Division by zero is an example of what type of error?

Syntax Error

Run-time Error

Semantic Error

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?