/
Mikhrutka
/
SpecialistPython2_v2
Обзор
Документация
Войти
/
Mikhrutka
/
SpecialistPython2_v2
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Module1/examples/03_class_constructor.py
15 строк
283 B
boo-learn
Module-1 examples and tasks
20 мар 2021, 07:01
20 мар 2021, 07:01
e730efa
Код
Авторство
О чём код?
class Point: # Конструктор def __init__(self, x, y): self.x = x self.y = y point1 = Point(10, -8) point2 = Point(12, 5) print("point1.x = ", point1.x) print("point1.y = ", point1.y) print("point2.x = ", point2.x) print("point2.y = ", point2.y)