Question: Python a. Create a file called YOUR_NAME_CityCountry.py i. Write a function called format_city_country_string. 1. Inputs: a. A string for the city name b. A string

 Python a. Create a file called "YOUR_NAME_CityCountry.py" i. Write a function

Python

a. Create a file called "YOUR_NAME_CityCountry.py" i. Write a function called "format_city_country_string". 1. Inputs: a. A string for the city name b. A string for the country name 2. Outputs: a. Formatted string "City, Country" b. For example, "Santiago, Chile" b. Create a file called "YOUR_NAME_CityCountry_test.py" i. Use the unittest module to write multiple test cases to test the "format_city_country_string" function. ii. Test Scenarios to consider: 1. City and Country parameters are provided 2. City is an empty string 3. Country is an empty string 4. City is not a string data type 5. Country is not a string data type iii. These test scenarios should guide your programming logic. Essentially, what should your function do based on each test scenario? 1. Update the function as needed to get these test scenarios to pass. c. Submit both files for this assignment. a. Create a file called "YOUR_NAME_CityCountry.py" i. Write a function called "format_city_country_string". 1. Inputs: a. A string for the city name b. A string for the country name 2. Outputs: a. Formatted string "City, Country" b. For example, "Santiago, Chile" b. Create a file called "YOUR_NAME_CityCountry_test.py" i. Use the unittest module to write multiple test cases to test the "format_city_country_string" function. ii. Test Scenarios to consider: 1. City and Country parameters are provided 2. City is an empty string 3. Country is an empty string 4. City is not a string data type 5. Country is not a string data type iii. These test scenarios should guide your programming logic. Essentially, what should your function do based on each test scenario? 1. Update the function as needed to get these test scenarios to pass. c. Submit both files for this assignment

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!