From 7a4b0e0807ee88f147fa4001e6bed379cd02ba1c Mon Sep 17 00:00:00 2001 From: Liam Moore Date: Sat, 12 Aug 2023 20:22:23 +0200 Subject: [PATCH] README --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index c8e8e8a..aeaf99e 100644 --- a/README.md +++ b/README.md @@ -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: