Error Finding

Error Finding

12th Grade

10 Qs

quiz-placeholder

Similar activities

Microcontroller

Microcontroller

11th Grade - University

10 Qs

Input, output and storage de

Input, output and storage de

8th Grade - Professional Development

14 Qs

Bài 2-Vai trò của thiết bị thông minh và tin học đối với xã hội

Bài 2-Vai trò của thiết bị thông minh và tin học đối với xã hội

10th - 12th Grade

10 Qs

ZOOM QUIZ

ZOOM QUIZ

1st - 12th Grade

10 Qs

loop while/do while

loop while/do while

7th - 12th Grade

10 Qs

Chapter 6 Part 2 - 4

Chapter 6 Part 2 - 4

11th - 12th Grade

11 Qs

Quiz - Quarter 4 (Oracle)

Quiz - Quarter 4 (Oracle)

12th Grade

10 Qs

EMPTECH L4 Q3

EMPTECH L4 Q3

12th Grade

10 Qs

Error Finding

Error Finding

Assessment

Quiz

Computers

12th Grade

Practice Problem

Hard

Created by

Demon Dog

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?