
Unit09-FuncnExcept CodeHSAI
Quiz
•
Computers
•
2nd Grade
•
Practice Problem
•
Hard
MrsT Voci
Used 3+ times
FREE Resource
Enhance your content in a minute
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Kenali ICT
Quiz
•
KG - University
20 questions
Hour of code
Quiz
•
1st - 2nd Grade
13 questions
Guess the Retro Computer 1
Quiz
•
KG - Professional Dev...
15 questions
Grade 2 Parts of Computer and Mouse
Quiz
•
2nd Grade
15 questions
S3 Databases Knowledge Check
Quiz
•
2nd - 9th Grade
13 questions
Video games
Quiz
•
1st - 9th Grade
13 questions
grade 2 computer quiz
Quiz
•
2nd Grade
20 questions
SOAL PBO KELAS XII RPL
Quiz
•
2nd Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
