Search Header Logo
list and operations

list and operations

Assessment

Presentation

English

11th Grade

Practice Problem

Easy

CCSS
6.NS.C.5, 5.NBT.A.2, L.1.1J

+3

Standards-aligned

Created by

Bruce Tabot

Used 2+ times

FREE Resource

7 Slides • 15 Questions

1

media

2

Multiple Choice

What is the benefit of using lists in programming?

1

They can only store one type of data

2

They are always faster than arrays

3

They provide the ability to store more than one value in the same variable

4

They cannot be accessed by index

3

Multiple Choice

Which data structure is best suited for storing key-value pairs?

1

List

2

Tuple

3

Dictionary

4

Set

4

media

5

Multiple Choice

What is the notation used to access the first element of a list in programming?

1

aList[0]

2

aList[1]

3

aList[i]

4

aList.first()

6

Multiple Choice

List items have an index number. In the following list, which item has the index number of 3?

["John", "Harry", "Jesse", "John", "Harry", "Harry"]

1

"John"

2

"Harry"

3

"Jesse"

7

media

8

Multiple Choice

What does the INSERT function do in the context of aList?

1

It removes an element from aList

2

It shifts elements to the right and adds a new value

3

It assigns a value to a specific index

4

It appends a value to the end of aList

9

Multiple Choice

How do you remove the element `10` from a list named `numbers`?

1

a) numbers.remove(10)

  

2

b) numbers.delete(10)

3

   c) numbers.pop(10)

4

 d) numbers.discard(10)

10

Multiple Choice

The list needs one more name added to the end - "Felipe". Which piece of code below would do this?

nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]

1

nameList.append(Felipe)

2

append(nameList,"Felipe")

3

nameList.append["Felipe",7]

4

nameList.append("Felipe")

11

Multiple Choice

Find the output of the code:

List = [True, 50, 10]

List.insert(2, 5)

print(List, "Sum is: ", sum(List))

1

[True, 50, 10, 5] Sum is: 66

2

[True, 50, 5, 10] Sum is: 65

3

TypeError: unsupported operand type(s) for +: ‘int’ and ‘str’

4

[True, 50, 5, 10] Sum is: 66

12

media

13

Multiple Choice

What does the REMOVE function do in the context of a list?

1

Removes an item at a specified index

2

Adds an item to the end of the list

3

Reverses the order of the list

4

Sorts the list in ascending order

14

media

15

Open Ended

Question image
  1. Describe step-by-step what this program does.

16

Multiple Choice

What will be the output of the following code? ```python for i in range(3): if i == 1: continue print(i) ```

1

0 1 2

2

0 1

3

0 2

4

1 2

17

media

18

Fill in the Blanks

media image

Type answer...

19

Multiple Choice

Question image

Part of a program is shown.

What happens in Lines 3 to 6 when the value 2.0 is entered at Line 2?

1

"Failed to qualify" message is displayed

2

"Congratulations" message is displayed

3

No message is displayed

4

Both messages are displayed

20

media

21

Multiple Choice

What will be printed by the following code?

1

1.5

2

2

3

0

4

3

22

Poll

How confident do you feel about this topic now?

Very confident
Somewhat confident
Not confident
media

Show answer

Auto Play

Slide 1 / 22

SLIDE