Data Structure

Data Structure

10th Grade

20 Qs

quiz-placeholder

Similar activities

Python Functions and Error Handling

Python Functions and Error Handling

10th Grade - University

20 Qs

Dictionary in Python

Dictionary in Python

10th - 12th Grade

20 Qs

Python Unit 6 Sequences Quiz

Python Unit 6 Sequences Quiz

9th - 12th Grade

20 Qs

untitled

untitled

8th Grade - University

25 Qs

Python Data Types Quiz

Python Data Types Quiz

10th Grade

22 Qs

Bootcamp

Bootcamp

7th - 12th Grade

16 Qs

Strings, Lists & Tuples

Strings, Lists & Tuples

9th - 12th Grade

20 Qs

Python-Checkpoint revision

Python-Checkpoint revision

9th - 12th Grade

21 Qs

Data Structure

Data Structure

Assessment

Quiz

Computers

10th Grade

Hard

Created by

yeshi dema

Used 7+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements about Python lists is true?

Lists are immutable.

Lists are ordered collections.

Lists can only contain elements of the same data type.

Lists use curly braces {} for initialization.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to add an element 'x' to the end of a list my_list?

'my_list.add(x)'

'my_list.insert(x, -1)'

'my_list.extend(x)'

'my_list.append(x)'

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements is true about tuples in Python?

Tuples are mutable.

Tuples are unordered.

Tuples can be used as keys in dictionaries.

Tuples use square brackets [] for initialization.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary difference between a list and a tuple in Python?

Lists are ordered, and tuples are unordered.

Lists are mutable, and tuples are immutable.

Lists can store elements of different data types, while tuples cannot.

Lists have a fixed size, while tuples can grow dynamically.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements about Python sets is true?

Sets allow duplicate elements.

Sets are ordered collections.

Sets are represented using square brackets [].

Sets automatically sort their elements.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the result of the following set operation in Python?

'intersection' will be an empty set.

'intersection' will contain the elements {1, 2, 3, 4, 5}.

'intersection' will contain the element {3}.

The code will raise an error.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a Python dictionary, what is the purpose of a key?

Keys are used to access values.

Keys are used to store duplicate values.

Keys are not necessary in dictionaries.

Keys determine the order of elements.

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?