---
id: 68b930ee0e7b8fb81895e59a
title: Step 7
challengeType: 20
dashedName: step-7
---

# --description--

Now you'll add a method to mark an email as read. When someone opens an email, you want to change its status from unread to read. This method will be simple - it just needs to set the `read` attribute to `True`.

Add a method called `mark_as_read` to your `Email` class. This method should take only `self` as a parameter and set the `read` attribute to `True`.

# --hints--

You should define a method named `mark_as_read` in the `Email` class.
that should only take `self` as a parameter.

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

})
```

The method should set `self.read` to `True`.

```js
({
    test: () => 
    {
        assert(runPython(`_Node(_code).find_class("Email").find_function("mark_as_read").find_variable("self.read").is_equivalent("self.read = True")`))
    }

})
```

# --seed--

## --seed-contents--

```py
class Email:
    def __init__(self, sender, receiver, subject, body):
        self.sender = sender
        self.receiver = receiver
        self.subject = subject
        self.body = body
        self.read = False
--fcc-editable-region--
    
--fcc-editable-region--
email_obj = Email('alice@example.com', 'bob@example.com', 'Hello', 'Hi Bob!')
print(email_obj.sender)
print(email_obj.subject)
print(email_obj.read)
```
