Словники в Python

Quiz
•
Computers
•
11th Grade
•
Medium
Юлія Токар
Used 3+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Як створити словник у Python?
Словник у Python створюється за допомогою списків.
Словник у Python можна створити так: my_dict = {'ключ1': 'значення1', 'ключ2': 'значення2'}.
Словник у Python можна створити так: my_dict = ['ключ1', 'значення1', 'ключ2', 'значення2'].
Словник у Python створюється за допомогою функції dict().
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Які методи доступні для роботи зі словниками?
remove()
Методи: get(), keys(), values(), items(), pop(), update(), clear()
find()
append()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Як ітеруватися по ключах словника?
Використовуйте my_dict.keys() або цикл for для ітерації по ключах.
Використовуйте my_dict.get() для доступу до ключів.
Використовуйте my_dict.items() для ітерації по парам ключ-значення.
Використовуйте my_dict.values() для ітерації по значеннях.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Які функції можна використовувати зі словниками?
remove()
get(), keys(), values(), items(), pop(), update(), clear(), copy()
sort()
append()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Які типи даних можуть бути ключами словника?
Множини
Функції
Списки
Рядки, числа, кортежі (незмінні елементи), булеві значення.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Як додати новий елемент до словника?
my_dict['новий_ключ'] = новий_значення
my_dict.append('новий_ключ', 'значення')
my_dict.add('новий_ключ', 'значення')
my_dict['новий_ключ'] = 'значення'
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Як видалити елемент зі словника?
Використовуйте 'my_dict.remove(key)' для видалення елемента.
Словники не підтримують видалення елементів.
Видалення елемента можливе лише через 'my_dict.clear()' для очищення всього словника.
Використовуйте 'del my_dict[key]' або 'my_dict.pop(key)'.
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Dictionary in Python

Quiz
•
11th - 12th Grade
10 questions
Безпека в мережевих спільнотах

Quiz
•
6th Grade - University
10 questions
Тест. Логічні операції

Quiz
•
7th - 12th Grade
15 questions
Змінні 3.0

Quiz
•
4th Grade - University
12 questions
Цикл While

Quiz
•
8th - 11th Grade
11 questions
DIctionary

Quiz
•
11th Grade
12 questions
Тест 7-Б

Quiz
•
7th - 12th Grade
12 questions
Елементи керування ListBox

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade