Unit09-FuncnExcept CodeHSAI

Unit09-FuncnExcept CodeHSAI

2nd Grade

18 Qs

quiz-placeholder

Similar activities

3 4. Secret Messages and Code (Data)

3 4. Secret Messages and Code (Data)

1st - 5th Grade

16 Qs

The Mouse

The Mouse

KG - 3rd Grade

20 Qs

fateen robot

fateen robot

2nd Grade

20 Qs

Spreadsheet

Spreadsheet

KG - 4th Grade

20 Qs

Computer Mouse Quiz

Computer Mouse Quiz

2nd Grade

15 Qs

Database Basics v2 N5

Database Basics v2 N5

1st - 12th Grade

20 Qs

ôn tập lớp 5

ôn tập lớp 5

2nd Grade

14 Qs

Word Processing Lessons 3 and 4 Review

Word Processing Lessons 3 and 4 Review

KG - University

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

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?

Discover more resources for Computers