Python LIST

Python LIST

9th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

Tin học 10_Bài 16 (Ngôn ngữ lập trình bậc cao và Python)

Tin học 10_Bài 16 (Ngôn ngữ lập trình bậc cao và Python)

10th Grade

10 Qs

MYOB

MYOB

10th Grade

10 Qs

 Lists

Lists

5th - 12th Grade

8 Qs

Fun with Numpy

Fun with Numpy

9th - 12th Grade

10 Qs

Python Dasar

Python Dasar

10th Grade

10 Qs

Nirmala School quiz

Nirmala School quiz

9th - 12th Grade

12 Qs

Списки в Python

Списки в Python

12th Grade

10 Qs

Data Awal Perusahaan Manufaktur II

Data Awal Perusahaan Manufaktur II

12th Grade

10 Qs

Python LIST

Python LIST

Assessment

Quiz

Education

9th - 12th Grade

Easy

Created by

Sharfuddin Mohammed

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is not a core data type?

LIst

Dictionary

Class

Tuple

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code snippet?

my_list = [3, 6, 9]

my_list.append(12)

print(len(my_list))

3
4
5
6

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following methods can be used to add multiple elements to a list at once?

append()
extend()
insert()
pop()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will my_list[-1] return?

The last item in the list
The first item in the list
An error
The second item in the list

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following methods removes the first occurrence of a specific value from a list?

remove()
delete()
pop()
discard()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the following code?

numbers = [1, 2, 3, 4, 5]

squared = [num ** 2 for num in numbers]

print(squared)

[1, 4, 9, 16, 25]
[1, 2, 3, 4, 5]
[2, 4, 6, 8, 10]
[1, 3, 5, 7, 9]

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements is true about Python lists?

a) Lists in Python are fixed-size, meaning their length cannot change after creation.

b) Lists can contain elements of different data types in a single list.

c) Lists in Python can only store integers and strings.

d) Lists are created using curly braces {}.

Lists in Python are fixed-size, meaning their length cannot change after creation.
Lists can contain elements of different data types in a single list.
Lists in Python can only store integers and strings.
Lists are created using curly braces {}.

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?