Python - Lists, Dictionaries and Loops

Python - Lists, Dictionaries and Loops

9th - 12th Grade

40 Qs

quiz-placeholder

Similar activities

PTS GENAP INFORMATIKA KELAS 11

PTS GENAP INFORMATIKA KELAS 11

11th Grade

40 Qs

Python list 2025

Python list 2025

11th Grade

38 Qs

Programming HW

Programming HW

12th Grade

39 Qs

Semester Final 2025

Semester Final 2025

10th Grade - University

40 Qs

Python Unit 11 - Collections: Dictionary, List, Set, Tuple

Python Unit 11 - Collections: Dictionary, List, Set, Tuple

6th - 12th Grade

40 Qs

Python Review

Python Review

8th - 12th Grade

35 Qs

Intro to HTML & CSS

Intro to HTML & CSS

9th - 12th Grade

35 Qs

Midterm prep 7th

Midterm prep 7th

7th Grade - University

41 Qs

Python - Lists, Dictionaries and Loops

Python - Lists, Dictionaries and Loops

Assessment

Quiz

Computers

9th - 12th Grade

Medium

Created by

Roberto Frontera

Used 150+ times

FREE Resource

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

list[a:b] will return the portion of list starting with index a and ending before index b.

True

False

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the value of last_jedi after the following code is run?

["kylo", "rey", "finn", "luke"]

["kylo", "rey", "finn"]

3

4

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the value of authors after the following code is run?

["Martin", "Rowling", "Tolkien"]

["Martin"]

["Rowling"]

["Tolkien", "Rowling", "Martin"]

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What will this code print?

6

1

pants

"pants": 6

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the value of colors after the following code is run?

["light blue", "pink"]

["light blue", "yellow", "pink"]

["pink", "yellow"]

["light blue", "yellow"]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to write a for loop to iterate through the list grades?

for variable:

for variable in grades

variable in grades:

for variable in grades:

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What does the following code do?

It prints [0, 6].

It prints all numbers in range(0, 6) in a list.

It prints all numbers in range(0, 6) separately.

It prints True or False.

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?