Challenge: User
Oppgave
Swipe to start coding
- Define the
User
class by theclass
keyword. - The
User
class should have the__init__
method that takes 3 arguments:
self
- an instance of the class.
username
- user's username.
password
- user's password. - The
__init__
method should assign arguments to the instance attributes via theself
keyword. - Create the
bob
instance of theUser
class with any username and password.
Once you've completed this task, click the button below the code to check your solution.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 1. Kapittel 5
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Awesome!
Completion rate improved to 2.78Awesome!
Completion rate improved to 2.78
Challenge: User
Oppgave
Swipe to start coding
- Define the
User
class by theclass
keyword. - The
User
class should have the__init__
method that takes 3 arguments:
self
- an instance of the class.
username
- user's username.
password
- user's password. - The
__init__
method should assign arguments to the instance attributes via theself
keyword. - Create the
bob
instance of theUser
class with any username and password.
Once you've completed this task, click the button below the code to check your solution.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 1. Kapittel 5
single
Awesome!
Completion rate improved to 2.78
Challenge: User
Sveip for å vise menyen
Oppgave
Swipe to start coding
- Define the
User
class by theclass
keyword. - The
User
class should have the__init__
method that takes 3 arguments:
self
- an instance of the class.
username
- user's username.
password
- user's password. - The
__init__
method should assign arguments to the instance attributes via theself
keyword. - Create the
bob
instance of theUser
class with any username and password.
Once you've completed this task, click the button below the code to check your solution.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!