Unit09-FuncnExcept CodeHSAI

Unit09-FuncnExcept CodeHSAI

2nd Grade

18 Qs

quiz-placeholder

Similar activities

KS3_Data Representations (from clay to silicon)

KS3_Data Representations (from clay to silicon)

1st - 3rd Grade

15 Qs

CLASS 2 QUIZ SET 1

CLASS 2 QUIZ SET 1

2nd Grade

20 Qs

Data warehouse unit 1

Data warehouse unit 1

1st - 5th Grade

15 Qs

Microsoft Excel

Microsoft Excel

KG - Professional Development

20 Qs

MS Office

MS Office

1st - 2nd Grade

15 Qs

PARTS OF COMPUTER

PARTS OF COMPUTER

1st - 2nd Grade

16 Qs

Systems Architecture

Systems Architecture

KG - 9th Grade

15 Qs

Revision on KolourPaint

Revision on KolourPaint

2nd 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?