Error Finding

Error Finding

12th Grade

10 Qs

quiz-placeholder

Similar activities

python String and comment

python String and comment

3rd Grade - University

13 Qs

Scope of Variables in Python

Scope of Variables in Python

1st Grade - Professional Development

15 Qs

Python Operators

Python Operators

12th Grade

12 Qs

Python Conditionals and If Statements

Python Conditionals and If Statements

8th Grade - University

15 Qs

Grade 12-Python selection&iteration

Grade 12-Python selection&iteration

11th - 12th Grade

15 Qs

Basic Python Coding

Basic Python Coding

11th - 12th Grade

15 Qs

Python Basics

Python Basics

KG - University

15 Qs

Basics of Python

Basics of Python

9th - 12th Grade

12 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?