Unit09-FuncnExcept CodeHSAI

Unit09-FuncnExcept CodeHSAI

2nd Grade

18 Qs

quiz-placeholder

Similar activities

MS Paint

MS Paint

1st - 4th Grade

13 Qs

Computer

Computer

2nd Grade

14 Qs

empowerment quiz2

empowerment quiz2

1st - 5th Grade

20 Qs

Adopt me

Adopt me

KG - Professional Development

14 Qs

second , lesson 3&4

second , lesson 3&4

2nd Grade

15 Qs

Computer science revision

Computer science revision

2nd - 3rd Grade

20 Qs

S2 Databases

S2 Databases

2nd Grade

15 Qs

Computer parts

Computer parts

1st - 12th Grade

20 Qs

Unit09-FuncnExcept CodeHSAI

Unit09-FuncnExcept CodeHSAI

Assessment

Quiz

Computers

2nd Grade

Practice Problem

Hard

Created by

MrsT Voci

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

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

18 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What type of error is raised when the user enters something that isn't a number?

NameError

TypeError

ValueError

SyntaxError

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What type of error is raised when the user tries to divide by zero?

ZeroDivisionError

TypeError

ValueError

IndexError

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What programming constructs can be used to gracefully handle exceptions?

for loops

try and accept blocks

while loops

if-else statements

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the try block contain in exception handling?

Code that will run before the exception is raised

Code that will run if an exception is raised

Code that will always run

Code that will never run

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of using try and accept in exception handling?

To ignore exceptions

To raise more exceptions

To stop the program

To gracefully handle exceptions

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the accept block specify in exception handling?

Type of exception to raise

Type of exception to catch

Type of exception to handle

Type of exception to ignore

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of giving age a default value of -1 in the program?

To calculate the user's age

To stop the program

To handle exceptions

To print the user's name and age

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?