Test 2

Test 2

11th Grade

33 Qs

quiz-placeholder

Similar activities

Python Certified Specialist

Python Certified Specialist

9th Grade - Professional Development

31 Qs

Python Credential Test

Python Credential Test

9th Grade - Professional Development

31 Qs

Python Their Certification

Python Their Certification

9th Grade - Professional Development

31 Qs

ทดสอบภาษาไพทอนเบื้องต้น

ทดสอบภาษาไพทอนเบื้องต้น

10th - 12th Grade

30 Qs

Python программалоо тили

Python программалоо тили

7th - 11th Grade

30 Qs

Python

Python

11th Grade

38 Qs

ITFun Objective 4- Software Development P1

ITFun Objective 4- Software Development P1

11th - 12th Grade

33 Qs

XI Computer Science - 3

XI Computer Science - 3

11th Grade

28 Qs

Test 2

Test 2

Assessment

Quiz

Computers

11th Grade

Easy

Created by

Ferhat Travaci

Used 10+ times

FREE Resource

33 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

What is the primary purpose of a dictionary in Python?

Storing elements in a sorted order.

Storing only numeric data.

To perform mathematical operations

To store data values in key:value pairs

2.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

What does it mean for a dictionary to be changeable?

Items can be added, removed, or modified after the dictionary has been created

The items cannot be modified

The items have a defined order

The dictionary cannot have duplicate items

3.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

How can you determine the number of items in a dictionary?

Using the count() method

Using the length() function

Using the len() function

Using the size() method

4.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

What data types can the values in dictionary items be?

Only int data type

Only boolean data type

Only string data type

String, int, boolean, and list data types

5.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Media Image

Suppose you have the following dictionary, which stores the names and ages of people.

Which line correctly prints Bo’s age?

print(my_dictionary[0])

print(my_dictionary[0][1])

print(my_dictionary["Bo"])

print(my_dictionary["Bo"][1])

6.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

What kind of data structure is user_data in the following declaration?

user_data = {"name": "TJ", "age":24, "user_name":"artLover123"}

Tuple

List

Dictionary

2D List

7.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

A dictionary maps:

strings to strings

strings to numbers

indices to elements

keys to values

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?