Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Challenge: Using init and self in Classes | Class Structures
Object Oriented Programming with Python
Sezione 1. Capitolo 4
single

single

Challenge: Using init and self in Classes

Scorri per mostrare il menu

Compito

Scorri per iniziare a programmare

  • 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.

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 1. Capitolo 4
single

single

Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

some-alt