Search Header Logo

ITC106 Quiz 7 - Lists and Tuples

Authored by Sudath Heiyanthuduwage

Computers

University

Used 19+ times

ITC106 Quiz 7 - Lists and Tuples
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What are the data items in the list called?

data

elements

items

values

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which list will be referenced by the variable number after the execution of the following code?

number = range(0, 9, 2)

[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

[1, 3, 5, 7, 9]

[2, 4, 6, 8]

[0, 2, 4, 6, 8]

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What would you use if an element is to be removed from a specific index?

del statement

remove method

index method

slice method

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the first negative index in a list?

0

-1

-0

Size of the string or list minus one

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What method can be used to place an item in the list at a specific index?

append

index

insert

Add

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What would be the value of the variable list after the execution of the following code?

list = [1, 2]

list = list * 3

[1, 2] * 3

[3, 6]

[1, 2, 1, 2, 1, 2]

[[1, 2], [1, 2], [1, 2]]

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What would be the value of the variable list after the execution of the following code?

list = [1, 2, 3, 4]

list[3] = 10

[1, 2, 3, 10]

[1, 2, 10, 4]

[1, 10, 10, 10]

invalid code

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?