Python Словники

Python Словники

12th Grade

9 Qs

quiz-placeholder

Similar activities

7 клас Електронне листування

7 клас Електронне листування

12th Grade

12 Qs

Алгоритмізація 2 частина  клас 7 +підсумкова

Алгоритмізація 2 частина клас 7 +підсумкова

12th Grade

13 Qs

RW4G Review

RW4G Review

4th - 12th Grade

8 Qs

Arrays in Swift

Arrays in Swift

10th - 12th Grade

13 Qs

Вікторина

Вікторина

1st - 12th Grade

12 Qs

Bots and Botnets

Bots and Botnets

10th - 12th Grade

10 Qs

8 клас WORD 1 15/10

8 клас WORD 1 15/10

12th Grade

12 Qs

Excel. Формули 7 клас

Excel. Формули 7 клас

1st - 12th Grade

12 Qs

Python Словники

Python Словники

Assessment

Quiz

Computers

12th Grade

Practice Problem

Medium

Created by

Olga Maksimenko

Used 4+ times

FREE Resource

AI

Enhance your content in a minute

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

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Які основні методи можна використовувати зі словниками в Python?

Отримання значення за ключем, додавання нової пари ключ-значення, видалення пари ключ-значення, перевірка наявності ключа, отримання списку ключів, отримання списку значень, отримання списку пар ключ-значення

Створення нового словника

Оновлення значення за ключем

Видалення всіх пар ключ-значення

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Наведіть приклади використання словників у Python.

data = {'key': 'value'}

user = {'name': 'John', 'age': 30}

person = {'first_name': 'Jane', 'last_name': 'Doe'}

user = {'name': 'Alice', 'age': 25}

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Які методи можна використовувати для додавання елементів до словника?

Використання методу insert()

Створення нового словника та копіювання елементів

Просте присвоєння значення до нового ключа та використання методу update()

Використання методу add()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Які методи можна використовувати для видалення елементів зі словника?

pop(), del

remove()

erase

clear

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Як можна ітеруватися по елементах словника?

for i in range(len(dictionary)):

for key in dictionary:

for value in dictionary.values():

for key, value in dictionary.items():

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Як можна здійснити пошук елементів у словнику?

dictionary.index(key)

dictionary[value]

dictionary[key]

dictionary.get(key)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Як можна видалити всі елементи зі словника в Python?

clear()

delete_all()

remove_all()

pop_all()

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?