list in python

list in python

10th - 12th Grade

15 Qs

quiz-placeholder

Similar activities

PH SIMKMDIG KD 3.1 Menerapkan Logika dan Algoritma Komputer

PH SIMKMDIG KD 3.1 Menerapkan Logika dan Algoritma Komputer

1st - 10th Grade

20 Qs

Tin 10 - Bái 21 - 22 - 23

Tin 10 - Bái 21 - 22 - 23

10th Grade

16 Qs

Chapter 3 Exploring Linux Filesystems

Chapter 3 Exploring Linux Filesystems

11th Grade - University

10 Qs

Ulangan1-DETIC-Informatika

Ulangan1-DETIC-Informatika

10th Grade

20 Qs

Lesson 5 Looping Quiz

Lesson 5 Looping Quiz

10th - 12th Grade

15 Qs

Типы данных, операторы в Паскале

Типы данных, операторы в Паскале

10th Grade

18 Qs

B Words GCSE Computer Science

B Words GCSE Computer Science

1st - 10th Grade

15 Qs

Les variables sous Python

Les variables sous Python

10th - 12th Grade

10 Qs

list in python

list in python

Assessment

Quiz

Computers

10th - 12th Grade

Practice Problem

Hard

Created by

Suman Joshi

Used 733+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following list assignment

aList = [4, 8, 12, 16]

aList[1:4] = [20, 24, 28]

print(aList)

[4, 20, 24, 28, 8, 12, 16]

[4, 20, 24, 28]

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following list operation

aList = [10, 20, 30, 40, 50, 60, 70, 80]

print(aList[2:5])

print(aList[:4])

print(aList[3:])

[20, 30, 40, 50]

[10, 20, 30, 40]

[30, 40, 50, 60, 70, 80]

[30, 40, 50]

[10, 20, 30, 40]

[40, 50, 60, 70, 80]

None of these

3.

MULTIPLE SELECT QUESTION

1 min • 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)

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following

aList = [5, 10, 15, 25]

print(aList[::-2])

[15, 10, 5]

[10, 5]

[25, 10]

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following list function?

sampleList = [10, 20, 30, 40, 50]

sampleList.append(60)

print(sampleList)


sampleList.append(60)

print(sampleList)

[10, 20, 30, 40, 50, 60]

[10, 20, 30, 40, 50, 60, 60]

[10, 20, 30, 40, 50, 60]

[10, 20, 30, 40, 50, 60]

both are wrong

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

In Python, list is mutable

False

True

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following would give an error?

list1=[]

list1=[]*3

list1=[2,8,7]

None of the above

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?