Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Using init and self in Classes | Class Structures
Object Oriented Programming with Python
Секція 1. Розділ 4
single

single

Challenge: Using init and self in Classes

Свайпніть щоб показати меню

Завдання

Проведіть, щоб почати кодувати

  • Define a class called Book.
  • The class should have an __init__ method that takes three parameters: self, title, and author.
  • Initialize the title and author attributes using self.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 4
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

some-alt