From 9037bdc851a98aff3eaf40c92a408ef4d3525da7 Mon Sep 17 00:00:00 2001 From: cheeks <134818917+leftovertoast@users.noreply.github.com> Date: Tue, 11 Feb 2025 12:16:18 -0500 Subject: [PATCH] Completed Exercise 8-5 Cities --- Chapter_08/8-05.cities.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Chapter_08/8-05.cities.py diff --git a/Chapter_08/8-05.cities.py b/Chapter_08/8-05.cities.py new file mode 100644 index 0000000..5872914 --- /dev/null +++ b/Chapter_08/8-05.cities.py @@ -0,0 +1,9 @@ +# Exercise 8-5 Cities +# Learning Objective: Write a function that has a default value. Call it three times. + +def describe_city(city, country='United States'): + print(f'{city.title()} is in {country.title()}') + +describe_city('Chicago') +describe_city('Annapolis') +describe_city('Paris', 'France')