Python - Loops, Patterns & List manipulations

Python - Loops, Patterns & List manipulations

11th Grade

15 Qs

quiz-placeholder

Similar activities

For and While Loops in Python

For and While Loops in Python

9th - 12th Grade

16 Qs

C++

C++

11th Grade

20 Qs

python modules

python modules

11th Grade

20 Qs

Java 2D Arrays_Review

Java 2D Arrays_Review

11th Grade

19 Qs

Intro to Java Loops

Intro to Java Loops

9th - 12th Grade

15 Qs

Arrays

Arrays

10th - 12th Grade

10 Qs

For Loop in Python

For Loop in Python

11th Grade

10 Qs

Python Basics (CodeHS)

Python Basics (CodeHS)

7th - 12th Grade

20 Qs

Python - Loops, Patterns & List manipulations

Python - Loops, Patterns & List manipulations

Assessment

Quiz

Computers

11th Grade

Medium

Created by

Rajath Vijayakumar

Used 6+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following correctly represents a Python for loop syntax?

for i in range(10):

foreach i in range(10):

for (i = 0; i < 10; i++):

for i to 10:

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What does the following code snippet print?

1 2 3

0 1 2 3

0 1 2

1 2

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What will be the output of the following code?

0 0, 1 1, 2 2

0 0, 0 1, 1 0, 1 1, 2 0, 2 1

0 1, 1 2

Error

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

How many times will the following loop execute?

2

3

5

6

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the correct way to skip the current iteration in a loop?

break

continue

pass

None of the above

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What pattern is printed by this code?

Media Image
Media Image

None of the above

Media Image

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

Which of the following will generate the pattern below?

Media Image
Media Image

Both a and b

None of the above

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?