Exceptions and Classes

Exceptions and Classes

Professional Development

21 Qs

quiz-placeholder

Similar activities

Vòng tăng tốc - Marathon CSĐL

Vòng tăng tốc - Marathon CSĐL

Professional Development

20 Qs

Web Channel-GAAD- Accessibility Trivia

Web Channel-GAAD- Accessibility Trivia

Professional Development

20 Qs

mario and luige

mario and luige

KG - Professional Development

19 Qs

dessert

dessert

KG - Professional Development

18 Qs

Pokemon Master Course

Pokemon Master Course

4th Grade - Professional Development

20 Qs

Office 365 & Services

Office 365 & Services

Professional Development

20 Qs

Logika & Pemrograman (ID)

Logika & Pemrograman (ID)

10th Grade - Professional Development

20 Qs

christmas songs'

christmas songs'

6th Grade - Professional Development

17 Qs

Exceptions and Classes

Exceptions and Classes

Assessment

Quiz

Fun, Computers

Professional Development

Practice Problem

Medium

Created by

Estefanía Garcés Pérez

Used 9+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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.

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?