python-crash-course/Chapter_08/8-06_city_names.py
2025-02-21 14:41:04 +00:00

11 lines
325 B
Python

# 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'))