Completed 11-1 City, Country
This commit is contained in:
parent
be086de29b
commit
1befd9566a
1
Chapter_11/README.md
Normal file
1
Chapter_11/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
Forgone the naming convention due to conflict with module naming and numbers in the file name.
|
||||||
6
Chapter_11/city_functions.py
Normal file
6
Chapter_11/city_functions.py
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Exercise 11-01 City, Country
|
||||||
|
# Learning Objective: Create a unit test for a function and run it.
|
||||||
|
|
||||||
|
def create_city_string(city, country):
|
||||||
|
new_string = city.title() + ", " + country.title()
|
||||||
|
return new_string
|
||||||
8
Chapter_11/test_cities.py
Normal file
8
Chapter_11/test_cities.py
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
from city_functions import create_city_string
|
||||||
|
|
||||||
|
def test_city_country():
|
||||||
|
output_string = create_city_string("talahasse", "united states")
|
||||||
|
print(f"{output_string}")
|
||||||
|
assert output_string == "Talahasse, United States"
|
||||||
|
|
||||||
|
test_city_country()
|
||||||
Loading…
x
Reference in New Issue
Block a user