
Урок 4 m3
Authored by Сергей Алипов
Computers
9th Grade

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Какой магический метод отвечает за оператор ==?
__eq__ (верно)
__lt__
__cmp__
__equal__
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Что произойдет, если сравнить два объекта без переопределения __eq__?
Сравнение будет по значениям всех атрибутов
Сравнение проверит, ссылаются ли объекты на один адрес в памяти (верно)
Программа вызовет ошибку
Сравнение вернет False
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Какие методы обязательно должны быть в классе, чтобы объект стал итерируемым?
Только __iter__
__iter__ и __next__ (верно)
Только __next__
__iter__, __next__ и __len__
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Какой метод вызывает оператор >?
__eq__
__lt__
__gt__ (верно)
__ge__
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Что делает метод __iter__?
Возвращает следующий элемент коллекции
Возвращает сам объект-итератор (верно)
Проверяет наличие следующего элемента
Останавливает итерацию
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Как остановить итерацию в методе __next__?
Вернуть None
Вызвать исключение StopIteration (верно)
Вернуть False
Использовать break
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Какой код корректно реализует сравнение объектов по атрибуту price?
class Product: def __lt__(self, other): return self.price < other.price
class Product: def __eq__(self, other): return self.price < other.price
class Product: def __cmp__(self, other): return self.price - other.price
class Product: def __gt__(self, other): return self.price == other.price
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
9 questions
QUEST FOR SUCCESS VOC. UNIT 1 Part 1 practice
Quiz
•
7th - 12th Grade
13 questions
Citizenship
Quiz
•
9th - 12th Grade
12 questions
C# Arrays
Quiz
•
9th - 12th Grade
10 questions
Entrepreneurship skill
Quiz
•
9th - 10th Grade
12 questions
HTML Basics
Quiz
•
7th - 12th Grade
14 questions
COMPUTER SYSTEM REPAIR
Quiz
•
1st Grade - University
10 questions
Input Devices
Quiz
•
1st - 10th Grade
14 questions
Types of Malware
Quiz
•
6th - 9th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
14 questions
[AP CSP] JavaScript Programming Quiz
Quiz
•
9th - 12th Grade
10 questions
Understanding Computers and Computer Engineering
Interactive video
•
7th - 12th Grade
37 questions
Python - Tuples, Lists, and List Methods
Quiz
•
9th - 12th Grade
60 questions
MOS Word Home, Insert, Reference Ribbon Basics
Quiz
•
9th Grade