---
id: 6895e4940e39950288e406c2
title: Step 10
challengeType: 20
dashedName: step-10
---

# --description--

Next, add another method to your class named `get_fact` that returns a fact about the instrument.

This method should have only the `self` parameter and return an f-string that says `The [instrument name] is part of the [instrument type] family of instruments.`

Unlike the `play` method which prints a message directly, this method should return a string that can be used elsewhere in your code.

# --hints--

You should define a method named `get_fact` with a `self` parameter.

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

Your `get_fact` method should return an f-string containing the instrument's name and type.

```js
({
  test: () => assert(runPython(`_Node(_code).find_class("MusicalInstrument").find_function("get_fact").find_return().is_equivalent("return f'The {self.name} is part of the {self.instrument_type} family of instruments.'")`))
});
```

# --seed--

## --seed-contents--

```py
class MusicalInstrument:
    def __init__(self, name, instrument_type):
        self.name = name
        self.instrument_type = instrument_type

    def play(self):
        print(f'The {self.name} is fun to play!')

--fcc-editable-region--

--fcc-editable-region--

instrument_1 = MusicalInstrument('Oboe', 'woodwind')
instrument_2 = MusicalInstrument('Trumpet', 'brass')
```
