Skip to main content

Practice · 1 of 3

Extract the Greeting

CHALLENGE
Difficulty: beginner+25 XP

Three print lines greet three people. Refactor: write greet(name, balance) that returns the greeting string, and use it for all three people. Keep the printed lines IDENTICAL (three lines).

Back to lesson: Practice: Refactoring Drills