UNIT 4- LISTS, TUPLES, DICTIONARIES

UNIT 4- LISTS, TUPLES, DICTIONARIES

1st Grade

10 Qs

quiz-placeholder

Similar activities

Python - 01

Python - 01

1st - 5th Grade

11 Qs

FinalTest

FinalTest

1st - 2nd Grade

15 Qs

Basic Programming - Ulfah

Basic Programming - Ulfah

1st - 10th Grade

10 Qs

python

python

1st - 5th Grade

11 Qs

การเขียนโปรแกรม ม.1

การเขียนโปรแกรม ม.1

1st Grade

10 Qs

Business Analytics Python 01

Business Analytics Python 01

1st - 3rd Grade

10 Qs

Python-Partie7

Python-Partie7

1st Grade

10 Qs

Taller Python Auto Evaluación clase 1

Taller Python Auto Evaluación clase 1

1st Grade

9 Qs

UNIT 4- LISTS, TUPLES, DICTIONARIES

UNIT 4- LISTS, TUPLES, DICTIONARIES

Assessment

Quiz

Computers

1st Grade

Hard

Created by

DHASAMALIKA S

Used 2+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a list in Python?

A collection of items that are ordered and changeable

A single item in Python

A collection of items that are ordered and unchangeable

A collection of items that are unordered and unchangeable

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the elements of a list in Python?

By using the element's value within curly brackets

By using the element's position within angle brackets

By using the element's name within parentheses

By using the index of the element within square brackets.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

A list can be changed, while a tuple cannot.

A list is used for numbers, while a tuple is used for strings

A list and a tuple are the same thing

A list is immutable, while a tuple is mutable

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are tuples used for in Python?

Tuples are used to store multiple items in a single variable.

Tuples are used to create loops in Python.

Tuples are used for defining classes in Python.

Tuples are used for mathematical calculations in Python.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a tuple in Python?

By using angle brackets and separating the elements with semicolons

By using curly braces and separating the elements with commas

By using parentheses and separating the elements with commas

By using square brackets and separating the elements with commas

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a dictionary in Python?

A type of data structure

A type of computer program

A collection of key-value pairs

A type of book

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the values in a dictionary in Python?

By using the values as index

By using a for loop

By using the keys as index

By converting the dictionary to a list

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?