Challenge: User
Tâche
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.
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 1. Chapitre 5
single
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Suggested prompts:
Résumer ce chapitre
Expliquer le code dans file
Expliquer pourquoi file ne résout pas la tâche
Awesome!
Completion rate improved to 2.78
Challenge: User
Glissez pour afficher le menu
Tâche
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.
Solution
Tout était clair ?
Merci pour vos commentaires !
Awesome!
Completion rate improved to 2.78Section 1. Chapitre 5
single