Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 assignment

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What about leadership lessons from particularly good or bad bosses?

Answered: 1 week ago

Question

When would you use one approach, and when would you use another?

Answered: 1 week ago