From 5d635b6cbb4409d9b706cb7d988ff47b0ebcd5ef Mon Sep 17 00:00:00 2001 From: cheeks <134818917+leftovertoast@users.noreply.github.com> Date: Wed, 12 Feb 2025 10:31:16 -0500 Subject: [PATCH] Completed Exercise 8-6 City Names --- Chapter_08/8-06_city_names.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Chapter_08/8-06_city_names.py diff --git a/Chapter_08/8-06_city_names.py b/Chapter_08/8-06_city_names.py new file mode 100644 index 0000000..06f9350 --- /dev/null +++ b/Chapter_08/8-06_city_names.py @@ -0,0 +1,11 @@ +# Exercise 8-6 City Names +# Learning Objective: Create function that returns a value + +def city_country(city_name, country): + return f"{city_name.title()}, {country.title()}" + +#Call 3 Times + +print(city_country('Paris', 'France')) +print(city_country('Hamburg', 'Germany')) +print(city_country('Portland', 'United States')) \ No newline at end of file