Debugging Python Code Errors Quiz

Debugging Python Code Errors Quiz

10th Grade

10 Qs

quiz-placeholder

Similar activities

AP CSP Vocab Quiz BI 1, 2

AP CSP Vocab Quiz BI 1, 2

9th - 12th Grade

11 Qs

Python Print Statement

Python Print Statement

6th - 10th Grade

12 Qs

Unit 1 Vocab Review

Unit 1 Vocab Review

8th - 12th Grade

9 Qs

Programming - Syntax & Logic Errors

Programming - Syntax & Logic Errors

3rd - 12th Grade

10 Qs

Python End of Topic Quiz

Python End of Topic Quiz

8th Grade - University

15 Qs

Python errors

Python errors

10th - 12th Grade

8 Qs

Python basics

Python basics

9th - 12th Grade

10 Qs

Kabeer Python Assessment Quiz

Kabeer Python Assessment Quiz

7th - 12th Grade

10 Qs

Debugging Python Code Errors Quiz

Debugging Python Code Errors Quiz

Assessment

Quiz

Computers

10th Grade

Easy

Created by

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 during the execution of a program

Syntax Error

An error that occurs when the code does not conform to the rules

Logic Error

2.

MATCH QUESTION

1 min • 1 pt

Match the following

Divide by zero

Example of runtime error

Code runs, but not how you expected

Example of logic error

Missing a closing parentheses

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 syntax 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

Media Image

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?