python lists

python lists

7th Grade

15 Qs

quiz-placeholder

Similar activities

CodeMonkey 2

CodeMonkey 2

5th - 8th Grade

20 Qs

Java Basic Data Structures

Java Basic Data Structures

6th - 10th Grade

15 Qs

Coding Basics in Swift

Coding Basics in Swift

7th Grade

11 Qs

Fruits & Veggie

Fruits & Veggie

7th Grade

16 Qs

Python Ifs, Lists, and Loops

Python Ifs, Lists, and Loops

7th - 8th Grade

11 Qs

Елементи списку

Елементи списку

7th Grade

13 Qs

6. Python (списки)

6. Python (списки)

5th - 9th Grade

17 Qs

Grafičko sučelje - Tkinter

Grafičko sučelje - Tkinter

7th - 9th Grade

10 Qs

python lists

python lists

Assessment

Quiz

Computers

7th Grade

Hard

Created by

Anjali Malik

Used 1+ times

FREE Resource

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].

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?