Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Python help. Thank you. 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
Python help. Thank you.
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 assignmentStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started