Error Finding

Error Finding

12th Grade

10 Qs

quiz-placeholder

Similar activities

AP CSA Unit 1 & 2 Review

AP CSA Unit 1 & 2 Review

9th - 12th Grade

10 Qs

PCEP Section 4D: Basics of Python Exception Handling

PCEP Section 4D: Basics of Python Exception Handling

12th Grade

15 Qs

Python-Basic

Python-Basic

3rd Grade - University

15 Qs

Python Boolean

Python Boolean

11th - 12th Grade

11 Qs

Python Basics

Python Basics

6th - 12th Grade

9 Qs

Python - Year 8

Python - Year 8

3rd Grade - University

10 Qs

PCEP Section 4C: Python Built-In Exceptions Hierarchy

PCEP Section 4C: Python Built-In Exceptions Hierarchy

12th Grade

15 Qs

IoT Chapter 2 Review

IoT Chapter 2 Review

9th - 12th Grade

14 Qs

Error Finding

Error Finding

Assessment

Quiz

Computers

12th Grade

Hard

Created by

Demon Dog

Used 2+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the error in the following Python code?

print("Hello, world!)

a) Missing colon

b) Missing quotation mark


c) Missing parentheses

d) No error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the error in the following Python code?

if x = 5:

print("x is 5")

Not using any comparison operator for assignment
Using a colon (:) instead of an equal sign (=) for assignment
Using a triple equal sign (===) for assignment
Using a single equal sign (=) for assignment instead of a double equal sign (==) for comparison

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the error in the following Python code?

for i in range(5)

print(i)

Missing semicolon after 'for' loop statement
Incorrect indentation in 'for' loop
Missing colon (:) after 'for' loop statement
Wrong loop variable used in 'for' loop

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the error in the following Python code?

while True:

print("Infinite loop")

Missing break statement
Incorrect indentation
Syntax error in print statement
Missing continue statement

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the error in the following Python code?

def my_function:

print("Hello")

Missing quotation marks around function name
Missing colon after function name

no error

Missing parentheses after function name

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the error in the following Python code?

x = 10

y = 5

if x > y:

print("x is greater than y")

SyntaxError: invalid syntax
ValueError: x is not defined
TypeError: '>' not supported between instances of 'int' and 'str'
IndentationError: expected an indented block

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the error in the following Python code?

for i in range(5):

print(i)

TypeError
IndentationError
KeyError
SyntaxError

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?