Sezione 3. Capitolo 9
single
Challenge: Password Validation
Scorri per mostrare il menu
Note
The comments
The new code is belowandThe new code is abovewill help you to find the new code.
Compito
Scorri per iniziare a programmare
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).
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 3. Capitolo 9
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione