Unit09-FuncnExcept CodeHSAI

Unit09-FuncnExcept CodeHSAI

2nd Grade

18 Qs

quiz-placeholder

Similar activities

Web browsers

Web browsers

2nd - 6th Grade

19 Qs

Computer Operations and Fundamentals

Computer Operations and Fundamentals

2nd Grade

15 Qs

ZTE Phone Quiz

ZTE Phone Quiz

1st Grade - Professional Development

17 Qs

L1 & L2 class 1

L1 & L2 class 1

1st - 3rd Grade

20 Qs

Excel Quiz

Excel Quiz

KG - University

15 Qs

Networks - Year 8

Networks - Year 8

KG - 4th Grade

19 Qs

Grade 2 - Week 25 - WWW

Grade 2 - Week 25 - WWW

2nd Grade

13 Qs

Let's Have Some Fun

Let's Have Some Fun

1st - 5th Grade

18 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

Create a free account and access millions of resources

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?