Completed Exercise 8-5 Cities
This commit is contained in:
parent
766e35dbb5
commit
0f3a8794ea
9
Chapter_08/8-05.cities.py
Normal file
9
Chapter_08/8-05.cities.py
Normal file
@ -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')
|
||||||
Loading…
x
Reference in New Issue
Block a user