Challenge: User
Opgave
Swipe to start coding
- Define the
Userclass by theclasskeyword. - The
Userclass 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 theselfkeyword. - Create the
bobinstance of theUserclass with any username and password.
Once you've completed this task, click the button below the code to check your solution.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 5
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Suggested prompts:
Opsummér dette kapitel
Explain code
Explain why doesn't solve task
Awesome!
Completion rate improved to 2.78
Challenge: User
Stryg for at vise menuen
Opgave
Swipe to start coding
- Define the
Userclass by theclasskeyword. - The
Userclass 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 theselfkeyword. - Create the
bobinstance of theUserclass with any username and password.
Once you've completed this task, click the button below the code to check your solution.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 5
single