Search Header Logo
String Processing

String Processing

Assessment

Presentation

•

Computers

•

9th - 10th Grade

•

Practice Problem

•

Easy

Created by

Calum Gordon

Used 2+ times

FREE Resource

9 Slides • 22 Questions

1

String Processing

Processing read in data as 2-D lists

media

2

media

3

media

4

Multiple Select

Question image

In this lesson I am going to learn to ... ?

1

Split read-in data into lists

2

Store read lines in a 2D list

5

media

6

Multiple Select

What did you learn to do in the last lesson on reading data?

1

Open a file for read access

2

Read data in file

3

Remove the newline character from each line

7

media

8

Multiple Choice

Question image

What is the data type of each line of data that has been read from the file?

1

String

2

List

3

Integer

4

Boolean

9

media

10

Multiple Choice

What string method will turn the string into a list of elements, separated by the comma?

1

string.split(',')

2

string.split(,)

3

string.strip()

4

string.list(',')

11

media

12

Multiple Choice

Question image

What will be the value of line after this line of code:

line = line.split(',')

for the record about Alice?

1

['1','Alice','2','4\n']

2

[1,'Alice',2,4]

3

['1','Alice','2','4']

4

'1,Alice,2,'4\n'

13

Multiple Choice

Question image

What will be the value of colours after this line of code:

colours = colours.split(' ')

1

['Cyan','Magenta','Yellow','Black']

2

[Cyan,Magenta,Yellow,Black]

3

('Cyan','Magenta','Yellow','Black')

4

'Cyan,Magenta,Yellow,Black'

14

media

15

Multiple Choice

Question image

What are missing words in this code?

1

open

line

split

2

open

split

strip

3

read

line

split

4

open

strip

split

16

Fill in the Blank

Question image

Type the name of a subprogram ...

17

Fill in the Blank

Question image

Type the name of a subprogram parameter ...

18

Fill in the Blank

Question image

Type the name of an argument passed into a subprogram ...

19

Fill in the Blank

Question image

Type the name of a file method (without any parenthesis) ...

20

Fill in the Blank

Question image

Type the name of a data structure ...

21

Fill in the Blank

Question image

Type the name of a string method (without the parenthesis) ...

22

Fill in the Blank

Question image

Type the name of a list method (without the parenthesis) ...

23

Fill in the Blank

Question image

Type the name of a string variable ...

24

Fill in the Blank

Question image

Type the line number of a Boolean expression ...

25

Fill in the Blank

Question image

Type the last line number of a loop ...

26

Multiple Choice

Question image

What data type is the parameter of the subprogram?

1

List

2

string

3

integer

4

Boolean

27

Multiple Choice

Question image

What data type is returned by the subprogram?

1

List

2

string

3

integer

4

Boolean

28

media

29

Multiple Select

Question image

In this lesson I have learned to ...

1

Split lines on commas

2

Store read lines as records in 2D data structures

30

Open Ended

Question image

Thinking Hard

Now you have finished the task, what questions do you still want answered?

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

31

Poll

Question image

How much of this lesson have you understood?

None of it

Some of it

Most of it

All of it

String Processing

Processing read in data as 2-D lists

media

Show answer

Auto Play

Slide 1 / 31

SLIDE