

Sky House
The Sky House needs a doorbell that knows its guests. Write build_greeter(names): it takes a list of names and returns a list of greetings, one per name, in the same order.
Each greeting must read exactly Hello, NAME! Welcome to the Sky House. with the name in place of NAME. Guests sometimes type extra spaces around their name, so trim them first. An empty guest list gives an empty list back.
Build it step by step
- Loop over
nameswith aforloop. - Trim each name with
.strip(). - Build the sentence with an f-string and
appendit togreetings. - Return the finished list.
Examples
build_greeter(['Nova', 'Luka'])
→ ['Hello, Nova! Welcome to the Sky House.', 'Hello, Luka! Welcome to the Sky House.']
build_greeter([])
→ []
project.py
PYTHON
Saved as you type
Tests
0 of 4 passing- •two guestsbuild_greeter(['Nova', 'Luka'])expected ['Hello, Nova! Welcome to the Sky House.', 'Hello, Luka! Welcome to the Sky House.']
- •nobody homebuild_greeter([])expected []
- •one guestbuild_greeter(['Dreamer'])expected ['Hello, Dreamer! Welcome to the Sky House.']
- •names with stray spacesbuild_greeter([' Ada ', 'Grace'])expected ['Hello, Ada! Welcome to the Sky House.', 'Hello, Grace! Welcome to the Sky House.']
On the line
+200 XP
Pass all 4 tests to claim it.
