Section 3. Chapitre 9
single
Challenge: Password Validation
Glissez pour afficher le menu
Note
The comments
The new code is belowandThe new code is abovewill help you to find the new code.
Tâche
Glissez pour commencer à coder
Let's implement password validation for your code!
- Define the
passwordproperty by the@propertydecorator. - The
passwordproperty should return the_passwordattribute. - Implement the password setter by the
@property.setterdecorator.
Take attention: This decorator starts from the property name (@{property_name}.setter). - The password should be string with a length greater than or equal to
8. - Use the
self.passwordproperty inside the__init__()magic method
(not a_password).
Solution
Tout était clair ?
Merci pour vos commentaires !
Section 3. Chapitre 9
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