Python In transit loops and iterations

Python In transit loops and iterations

12th Grade

20 Qs

quiz-placeholder

Similar activities

Karel Quiz

Karel Quiz

8th - 12th Grade

22 Qs

Python Revision Tour - I

Python Revision Tour - I

12th Grade

15 Qs

Computer Science - Python

Computer Science - Python

9th - 12th Grade

15 Qs

Visual C# Quiz - Chapter 5: Loops, Files, and Random Numbers

Visual C# Quiz - Chapter 5: Loops, Files, and Random Numbers

12th Grade

15 Qs

Recursion Quiz (CP 2)

Recursion Quiz (CP 2)

10th - 12th Grade

15 Qs

icpcNU_ Loops and Arrays

icpcNU_ Loops and Arrays

12th Grade

15 Qs

Introduction to Programming Vocabulary

Introduction to Programming Vocabulary

9th - 12th Grade

16 Qs

Programming 2 - Arrays

Programming 2 - Arrays

10th - 12th Grade

17 Qs

Python In transit loops and iterations

Python In transit loops and iterations

Assessment

Quiz

Computers

12th Grade

Hard

Created by

Akirapeter Yong

Used 6+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which statement is used to terminate a loop in Python?

a) stop

b) end

c) exit

d) break

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is the keyword used in Python to create loops?

a) while

b) loop

c) for

d) cycle

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following options is used to execute a loop a fixed number of times?

a) for

b) while

c) repeat

d) iterate

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which option is used to iterate over each character of a string?

a) for loop

b) while loop

c) iterate loop

d) loop loop

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

How to access the index and element of a list in a for loop?

a) Use the range() function

b) Use the enumerate() function

c) Use the index() method

d) Use the items() method

6.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

How to get each element of a list and its corresponding index in a loop?

a) Use the index() method

b) Use the enumerate() function

c) Use for loop and range() function

d) Use the items() method

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

How to iterate over a list in reverse order in a loop?

a) Use the reversed() function

b) Use the reverse() method

c) Use for loop and range() function

d) Use while loop and range() function

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?