Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
SlapDrone committed Aug 12, 2023
1 parent 684ad57 commit 7a4b0e0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,22 @@ def generate_backwards_car_names(person: Person) -> list[Car]:
"""
```

Which gives:

Given a person, return a list of their cars with the model names backwards.

Here are some examples:

Inputs:
{"person": {"name": "alice", "age": 22, "cars": [{"model": "mini", "speed": 180.0}]}}
Outputs:
[{"model": "inim", "speed": 180.0}]

Inputs:
{"person": {"name": "bob", "age": 53, "cars": [{"model": "ford", "speed": 200.0}, {"model": "renault", "speed": 210.0}]}}
Outputs:
[{"model": "drof", "speed": 200.0}, {"model": "tluaner", "speed": 210.0}]

If you want to, you can implement your own `Formatter`. The only requirement is that it
follow the `FormatterProtocol`, by exposing one method with signature:

Expand Down

0 comments on commit 7a4b0e0

Please sign in to comment.