Search Header Logo

Python Lists Quiz

Authored by Ayaka Ikawa

Computers

6th Grade

Used 1+ times

Python Lists Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code: mylist = ['apple', 'banana', 'cherry']; print(mylist[1])?

cherry

banana

apple

orange

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a correct way to create a list in Python?

mylist = 'apple', 'banana', 'cherry'

mylist = ['apple', 'banana', 'cherry']

mylist = ('apple', 'banana', 'cherry')

mylist = {'apple', 'banana', 'cherry'}

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the first element of a list named 'fruits'?

fruits[first]

fruits[-1]

fruits[1]

fruits[0]

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the index of 'cherry' in the list ['apple', 'banana', 'cherry']?

1

3

0

2

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to add an item to the end of a list?

add()

append()

insert()

extend()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you remove the item 'banana' from the list ['apple', 'banana', 'cherry']?

remove('banana')

pop('banana')

delete('banana')

discard('banana')

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the result of len(['apple', 'banana', 'cherry'])?

2

3

4

5

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?