Search Header Logo
One-dimensional Lists

One-dimensional Lists

Assessment

Presentation

Computers

9th - 10th Grade

Practice Problem

Hard

Created by

Calum Gordon

Used 19+ times

FREE Resource

14 Slides • 13 Questions

1

One-Dimensional Lists

Working with 1-D Lists in Python

media

2

media

3

media

4

media

5

Multiple Select

Choose all the properties of a variable ...

1

has a name

2

has a value

3

resides in memory

4

has a data type

5

value cannot be changed

6

media

7

media

8

Multiple Choice

What is the best description of a data structure in computer science?

1

A container that can hold multiple values

2

Several containers that can hold multiple values

3

A container that can store data in a number of different structures

4

A variety of structures to store the same data in

9

Multiple Select

Choose all the statements that are true about traditional arrays ...

1

is a sequential data structure

2

all items must be of the same data type

3

data items are seperated by commas

4

has a named identifier

10

media

11

media

12

Multiple Choice

What data type does this list contain?


colours = ["red", "green", "blue", "yellow"]

1

str

2

int

3

float

4

bool

13

Multiple Choice

What is the meaning of this list assignment?


scores = []

1

Makes scores a list with no items

2

Makes scores a list but says nothing about its contents

3

Makes scores = 0

4

Makes scores a variable

14

media

15

Fill in the Blank

If scores = [12, 7, 9, 3, 11, 15, 16]


what is the value of scores[4]

16

Fill in the Blank

If names = ['bill', 'ben', 'bri', 'bro', 'baz', 'bud', 'bif']


what is the index position of 'bif'?

17

media

18

media

19

Fill in the Blank

colours = ["red", "green", "blue", "yellow"]


Type the code to add the colour "purple" to the list.

20

Fill in the Blank

names = ['bill', 'ben', 'bri', 'bro', 'baz', 'bud', 'bif']


Type the code to remove 'bri' from the list.

21

media

22

media

23

Fill in the Blank

scores = [12, 7, 11, 3, 11, 15, 7, 16]


Type the code to delete the 2nd 11 from the list.

24

Multiple Select

What's the difference between using ".remove()" and "del"?

1

".remove()" deletes the first occurence of item only

2

"del" deletes item at specific index position

3

using ".remove()" can cause program to crash if item is not in list

4

using "del" is less unpredictable

25

media

26

Open Ended

Question image

Thinking Hard

Create a short test about what you have been learning about in this lesson.

Make a note of the answers.

(use Shift+Enter to take a new line ...)

27

Poll

How much of this lesson have you understood?

None of it

Some of it

Most of it

All of it

One-Dimensional Lists

Working with 1-D Lists in Python

media

Show answer

Auto Play

Slide 1 / 27

SLIDE