Exceptions and Classes

Quiz
•
Fun, Computers
•
Professional Development
•
Medium

Estefanía Garcés Pérez
Used 9+ times
FREE Resource
21 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What's the use of try-except in Python?
Nothing.
Execute code if a condition is met.
Error handling.
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What's a Python class?
A function to create an object.
A procedure related to an object.
A template (blueprint) for creating objects.
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
When will the else part of try-except-else be executed?
Always.
When an exception occurs.
Never.
When an exception does not occur.
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Identify the term that describes the creation of a new object.
Declare.
Iteration.
Instantiation.
initialize.
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
When is the finally block executed?
When an exception occurs.
Always.
When an exception doesn't occur.
Never.
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Identify the code that properly creates an instance of a cass named Vehicle.
bus.Vehicle(wheels, color)
car = vehicle.create()
bike = Vehicle(2, "red")
bike = Vehicle(wheels, color)
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Can one except block handle multiple exceptions?
Yes.
Maybe.
No.
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Synchronized method"

Quiz
•
Professional Development
25 questions
เขียนโปรแกรมเชิงวัตถุ

Quiz
•
Professional Development
20 questions
IT英単語part3

Quiz
•
Professional Development
22 questions
HiTech Quiz 6

Quiz
•
Professional Development
25 questions
Quiz sobre PL/SQL

Quiz
•
Professional Development
19 questions
Kotlin quiz 3

Quiz
•
Professional Development
17 questions
Mocking Exceptions

Quiz
•
Professional Development
16 questions
Applied Networking

Quiz
•
12th Grade - Professi...
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade