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 program produces incorrect results
Runtime error
An error that occurs when the code does not conform to the rules
Logic Error
An error that occurs during the execution of a program
Syntax Error
2.
MATCH QUESTION
1 min • 1 pt
Match the following
Missing a closing parentheses
Example of runtime error
Divide by zero
Example of logic error
Code runs, but not how you expected
Example of syntax error
3.
MATCH QUESTION
1 min • 1 pt
Match the following
Run your code and observe the output
Catching a runtime error
Look for red underlines in most IDEs
Catching a logic error
Using try-catch blocks
Catching a syntax 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
15 questions
Python - Chpt 1 - Review

Quiz
•
9th - 12th Grade
10 questions
Exploring Python: Input and Output Essentials

Quiz
•
9th Grade - University
10 questions
LOOPS IN C++

Quiz
•
10th Grade - University
10 questions
Gr10B Semester2

Quiz
•
10th Grade
6 questions
C++ Chapter no 1

Quiz
•
10th Grade
12 questions
Errors in Python

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

Quiz
•
9th - 12th Grade
10 questions
Java Conditions and If Statements

Quiz
•
10th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade
29 questions
AP CSP Unit 2 Review (Code.org)

Quiz
•
10th - 12th Grade