Search Header Logo

Lists & Operators

Authored by A Bishop

Information Technology (IT)

8th Grade

Used 2+ times

Lists & Operators
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the first item in the list? [Apple, Banana, Orange, Grapes]

Apple

Banana

Orange

Grapes

Answer explanation

The first item in the list [Apple, Banana, Orange, Grapes] is Apple, as it appears first in the sequence. Therefore, the correct answer is Apple.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the item at index 2? [Apple, Banana, Orange, Grapes]

Orange

Apple

Banana

Grapes

Answer explanation

In the list [Apple, Banana, Orange, Grapes], the index starts at 0. Therefore, index 2 corresponds to the third item, which is Orange.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the last item in the list? [Apple, Banana, Orange, Grapes]

Grapes

Apple

Banana

Cherry

Answer explanation

The last item in the list [Apple, Banana, Orange, Grapes] is Grapes, as it appears at the end of the sequence. Therefore, the correct answer is Grapes.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If we append "Kiwi" to the list, what would be its index? [Apple, Banana, Orange, Grapes]

0

1

3

4

Answer explanation

The list [Apple, Banana, Orange, Grapes] has 4 items. Appending 'Kiwi' adds it as the 5th item, which is at index 4 (0-based indexing). Therefore, the index of 'Kiwi' will be 4.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

If we remove "Cherry" from the list, what happens to the index of "Grapes"? [Apple, Banana, Cherry, Grapes]

The index of "Grapes" decreases by 1

The index of "Date" increases by 1

The index of "Date" remains the same

The index of "Date" is removed

Answer explanation

Removing 'Cherry' shifts the indices of subsequent items left. 'Grapes' moves from index 3 to index 2. However, since 'Date' is not in the original list, its index does not exist, making the correct choice about 'Date' irrelevant.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the index of "Orange" after sorting the list alphabetically? [Banana, Apple, Orange, Grapes]

0

1

2

3

Answer explanation

After sorting the list alphabetically: [Apple, Banana, Grapes, Orange], 'Orange' is the last item, which is at index 3.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

[Apple, Banana, Orange, Grapes]

If we insert - fruits.insert(2."Melon") to the list, what does the new list look like?

[Apple, Banana, 2, Orange, Grapes]

[Apple, Banana, Orange, Melon, Grapes]

[Apple, Banana, Melon, Orange, Grapes]

[Apple, Banana, Orange, Grapes]

Answer explanation

Inserting 'Melon' at index 2 shifts 'Orange' and 'Grapes' to the right. The new list becomes [Apple, Banana, Melon, Orange, Grapes], making this the correct choice.

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?