Debugging Python Code Errors Quiz

Quiz
•
Computers
•
10th Grade
•
Easy
Dana Paz
Used 6+ times
FREE Resource
10 questions
Show all answers
1.
MATCH QUESTION
1 min • 1 pt
Match the following
An error that occurs when the code does not conform to the rules
Runtime error
An error that occurs when the program produces incorrect results
Logic Error
An error that occurs during the execution of a program
Syntax Error
2.
MATCH QUESTION
1 min • 1 pt
Match the following
Divide by zero
Example of syntax error
Missing a closing parentheses
Example of runtime error
Code runs, but not how you expected
Example of logic error
3.
MATCH QUESTION
1 min • 1 pt
Match the following
Run your code and observe the output
Catching a syntax error
Look for red underlines in most IDEs
Catching a runtime error
Using try-catch blocks
Catching a logic error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT an example of a runtime error?
Using a variable before it is defined
Trying to change "abc" into an int
Dividing a number by zero.
Using the wrong operator in a calculation.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Identify the syntax error in the following code:
print("Hello World)
Missing a parenthesis at the end of the line.
Missing a closing quotation mark.
Incorrect use of the print function.
Incorrect string format.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Identify the runtime error in the following code:
result = 10 / 0
Division by zero.
Incorrect use of the division operator (/).
Incorrect variable assignment, should be ==.
Incorrect use of the print function.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements will cause a syntax error?
print("Hello, World!")
if (x > 5) { print("x is greater than 5") }
for i in range(5): print(i)
x = 10
Answer explanation
Create a free account and access millions of resources
Similar Resources on Wayground
12 questions
Syntax and Logic Errors

Quiz
•
9th - 11th Grade
12 questions
Errors in Python

Quiz
•
9th - 12th Grade
10 questions
Python Basics

Quiz
•
8th - 10th Grade
10 questions
10 question quiz on identifying and correcting errors

Quiz
•
9th - 12th Grade
10 questions
Python Input/Output

Quiz
•
9th - 12th Grade
10 questions
Python Boolean and If

Quiz
•
9th - 12th Grade
9 questions
CMU CS Academy BUGS!

Quiz
•
9th - 12th Grade
8 questions
Python Debugging

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade