Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Password Validation | Encapsulation
In-Depth Python OOP
course content

Course Content

In-Depth Python OOP

In-Depth Python OOP

1. OOP Concepts
2. Inheritance
3. Encapsulation
4. Polymorphism and Abstraction
5. Magic Methods

Challenge: Password Validation

Note

The comments The new code is below and The new code is above will help you to find the new code.

Task

Let's implement password validation for your code!

  1. Define the password property by the @property decorator.
  2. The password property should return the _password attribute.
  3. Implement the password setter by the @property.setter decorator.
    Take attention: This decorator starts from the property name (@{property_name}.setter).
  4. The password should be string with a length greater than or equal to 8.
  5. Use the self.password property inside the __init__() magic method
    (not a _password).

Task

Let's implement password validation for your code!

  1. Define the password property by the @property decorator.
  2. The password property should return the _password attribute.
  3. Implement the password setter by the @property.setter decorator.
    Take attention: This decorator starts from the property name (@{property_name}.setter).
  4. The password should be string with a length greater than or equal to 8.
  5. Use the self.password property inside the __init__() magic method
    (not a _password).

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

Section 3. Chapter 9
toggle bottom row

Challenge: Password Validation

Note

The comments The new code is below and The new code is above will help you to find the new code.

Task

Let's implement password validation for your code!

  1. Define the password property by the @property decorator.
  2. The password property should return the _password attribute.
  3. Implement the password setter by the @property.setter decorator.
    Take attention: This decorator starts from the property name (@{property_name}.setter).
  4. The password should be string with a length greater than or equal to 8.
  5. Use the self.password property inside the __init__() magic method
    (not a _password).

Task

Let's implement password validation for your code!

  1. Define the password property by the @property decorator.
  2. The password property should return the _password attribute.
  3. Implement the password setter by the @property.setter decorator.
    Take attention: This decorator starts from the property name (@{property_name}.setter).
  4. The password should be string with a length greater than or equal to 8.
  5. Use the self.password property inside the __init__() magic method
    (not a _password).

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

Section 3. Chapter 9
toggle bottom row

Challenge: Password Validation

Note

The comments The new code is below and The new code is above will help you to find the new code.

Task

Let's implement password validation for your code!

  1. Define the password property by the @property decorator.
  2. The password property should return the _password attribute.
  3. Implement the password setter by the @property.setter decorator.
    Take attention: This decorator starts from the property name (@{property_name}.setter).
  4. The password should be string with a length greater than or equal to 8.
  5. Use the self.password property inside the __init__() magic method
    (not a _password).

Task

Let's implement password validation for your code!

  1. Define the password property by the @property decorator.
  2. The password property should return the _password attribute.
  3. Implement the password setter by the @property.setter decorator.
    Take attention: This decorator starts from the property name (@{property_name}.setter).
  4. The password should be string with a length greater than or equal to 8.
  5. Use the self.password property inside the __init__() magic method
    (not a _password).

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

Note

The comments The new code is below and The new code is above will help you to find the new code.

Task

Let's implement password validation for your code!

  1. Define the password property by the @property decorator.
  2. The password property should return the _password attribute.
  3. Implement the password setter by the @property.setter decorator.
    Take attention: This decorator starts from the property name (@{property_name}.setter).
  4. The password should be string with a length greater than or equal to 8.
  5. Use the self.password property inside the __init__() magic method
    (not a _password).

Switch to desktop for real-world practiceContinue from where you are using one of the options below
Section 3. Chapter 9
Switch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt