Python Exception Handling

Quiz
•
Computers
•
10th - 12th Grade
•
Hard
Carol Luce
Used 90+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many except statements can a try-except statement have?
None
One
Two
Multiple
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When is the finally block executed?
when an exception occurs
when no exception occurs
never
always
3.
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
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Can one except block handle multiple exceptions?
Yes
No
May be
Insufficient information
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The ZeroDivisionError may occur during which operation(s)?
Division
Modulus
Both
None
6.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of the following are reasons for exceptions to occur? (There is more than one answer!)
Entering invalid input
Doing wrong operation on specific data type
Wrong type arguments passed to built-in function
Incorrect assignment to variables
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the attached python code?
Take the card out of ATM
Value Error Occurred
Done
Take the card out of ATM
Type Error Occurred
Take the card out of ATM
Some Error Occurred
Take the card out of ATM
Withdraw
Done
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
PYTHON PROGRAMMING FUNDAMENTALS

Quiz
•
11th Grade
13 questions
Program Development - Python: Errors

Quiz
•
8th - 10th Grade
14 questions
Python Data types & Exceptions

Quiz
•
1st - 10th Grade
14 questions
year 8 lesson 2 quiz - python

Quiz
•
8th - 10th Grade
15 questions
Python Basics

Quiz
•
KG - University
15 questions
Scope of Variables in Python

Quiz
•
1st Grade - Professio...
11 questions
Python Boolean

Quiz
•
11th - 12th Grade
10 questions
KD-1 Dasar pemrograman python

Quiz
•
10th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade