---
id: 68c27fa1697ceb7c578b2c9f
title: Step 5
challengeType: 20
dashedName: step-5
---

# --description--

The `@property` decorator is used in Python to turn a method into a property. It is typically used to define getter methods, which are methods used to retrieve the value of an attribute:

```py
class Person:
    def __init__(self, name):
        self._name = name

    @property
    def name(self):
        return self._name

p = Person('Alice')
print(p.name)  # Alice
```

Create a method named `name` with a `self` parameter and decorate it with `@property`. Inside the method, return `self._name`.
    
# --hints--

Your `Employee` class should have a `name` method with a `self` parameter.

```js
({ test: () => assert(runPython(`_Node(_code).find_class("Employee").find_function("name").has_args("self")`)) })
```

Your `name` method should be decorated with `@property`.

```js
({ test: () => assert(runPython(`_Node(_code).find_class("Employee").find_function("name").has_decorators("property")`)) })
```

Your `name` method should return `self._name`.

```js
({ test: () => assert(runPython(`_Node(_code).find_class("Employee").find_function("name").has_return("self._name")`)) })
```

# --seed--

## --seed-contents--

```py
class Employee:
    def __init__(self, name, level):
        self._name = name
        self._level = level

    def __str__(self):
        return f'{self._name}: {self._level}'

--fcc-editable-region--
    
--fcc-editable-region--

charlie_brown = Employee('Charlie Brown', 'trainee')
print(charlie_brown)

```
