Search Header Logo
list Manipulation

list Manipulation

Assessment

Presentation

Computers

11th - 12th Grade

Medium

Created by

Chethana Balaji

Used 12+ times

FREE Resource

2 Slides • 13 Questions

1

list Manipulation

Using Iteration to access the elements in the list.

Slide image

2

Multiple Choice

Question image

What would this code show in the shell?

1

3

2

2

3

1

4

0

5

An error

3

Multiple Choice

Question image

What is output?

1

[5,1]

2

[5]

3

[5,5,3,4,]

4

[1,1]

4

Multiple Choice

Question image

What is output?

1

YES

2

NO

3

Error

4

nothing

5

Multiple Choice

Question image
What output will this code produce?
1
blue
2
green
3
red
4
error

6

Multiple Choice

What is the output of Following code?

cheeses = ['Cheddar', 'Edam', 'Gouda']

numbers = [42, 123]

print(cheeses, numbers)

1

['Cheddar', 'Edam', 'Gouda'] [42, 123]

2

[42, 123] ['Cheddar', 'Edam', 'Gouda']

3

Compilation Error

4

No output

7

Multiple Choice

Which of these is the best description of a list in Python?

1

A list is a collection of data that has an order and can be changed

2

A list is a lot of variables

3

A list is used for shopping

4

A list is a collection of data that cannot hold duplicated data and cannot be changed

8

Multiple Choice

What type of loop is used when you DO NOT know how many times you want to repeat something?
1
A WHILE Loop
2
A Counter
3
A FOR Loop
4
A Forever Loop

9

Multiple Choice

What type of loop is used when you know how many times you want to repeat something?
1
A WHILE Loop
2
An IF function
3
A FOR Loop
4
A Variable

10

Multiple Choice

What is the word used to describe repetition in programming?
1
Sequence
2
Selection
3
Iteration
4
Coding

11

Multiple Choice

Which of the operator can be used in Strings?

1

+

2

*

3

Both of the above

4

None of the above

12

Multiple Choice

To insert an the string "strawberries" in the first position of a list we use

1

fruit.append("strawberries, 1")

2

fruit.insert("strawberries",0)

3

fruit.insert(1, "strawberries")

4

fruit.insert(0, "strawberries")

13

Multiple Choice

Which of these pieces of code would return the name "Harry" from the following list?

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

1

nameList()

2

nameList[1]

3

NameList(4)

4

nameList["4"]

14

Student Activity

List in Python ----> for -Loop activity

15

Open Ended

How easy to use for loop for you in any concept rate your self in range of 1-5.

Try to state the reason, Why ?

list Manipulation

Using Iteration to access the elements in the list.

Slide image

Show answer

Auto Play

Slide 1 / 15

SLIDE