Search Header Logo

python lists

Authored by Anjali Malik

Computers

7th Grade

Used 1+ times

python lists
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 SELECT QUESTION

30 sec • 1 pt

Select all the correct options to join two lists in Python

listOne = ['a', 'b', 'c', 'd']

listTwo = ['e', 'f', 'g']

newList = listOne + listTwo

newList.extend(listOne, listTwo)

newList = listOne.extend(listTwo)

newList = extend(listOne, listTwo)

2.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

Select all the correct options to copy a list

aList = ['a', 'b', 'c', 'd']

newList = copy(aList)

newList = aList.copy()

newList.copy(aList)

newList = list(aList)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

fruitlist = ["banana","grapes","apple"]

fruitlist.sort()

print(fruitlist)

["banana","grapes","apple"]

["bananas","grapes","apple"]

["apple","banana","grapes"]

["banana","grapes","applez"]

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

fruitlist = ["banana","grapes","apple"]

var = "banana" in fruitlist

print(var)

False

True

5.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Study the following function:

any([5>8, 6>3, 3>1])  

What will be the output of this code?

True

None of these

Invalid code

False

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

fruitlist = ["apple","grapes","banana"]

fruitlist.reverse()

print(fruitlist)

["apple","grapes","banana"]

["banana","grapes","apple"]

["banana","grapes","apples"]

["bananas","grapes","apple"]

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Suppose list1 is [1, 3, 2], What is list1 * 2 ?

[1,6,4]

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

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

[2, 6, 4].

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?