0

Help me solve this?

Question:-Write a function called city_country() that takes in the name of a city and its country. The function should return a string formatted like this: "Santiago, Chile" Call your function with at least three city-country pairs, and print the value thats returned. =># I try to write code for this but i couldnt make it right ... def city_country(city_name, country_name): city_country_name = city_name + ' ' + country_name return city_country_name var = city_country({"Kathmandu", "Nepal"}) print(var)

6th May 2020, 12:29 AM
ujjman100
12 Antworten
+ 1
kibbo ghayal bro, question is, Call your function with at least three city-country pairs
6th May 2020, 3:24 AM
ujjman100
0
Kiibo bro , but string format must be in "Bhopal, India"
6th May 2020, 2:24 AM
ujjman100
0
The way you wrote that function it takes two parameters. "Bhopal,India" is one. Kiibo's right, "Bhopal","India" would be the correct usage of your function
6th May 2020, 2:44 AM
Slick
Slick - avatar
0
Sorry bro , only my half question was printed now read the question again
6th May 2020, 2:58 AM
ujjman100
0
Gotcha try using "**kwargs" as your parameter. Then find out how **kwargs works
6th May 2020, 3:04 AM
Slick
Slick - avatar
0
Haha 😂.we can't ask to change this question ?very funny lol lan stewart
6th May 2020, 3:19 AM
ujjman100
0
lan stewart bro, question said return the value, so ..
6th May 2020, 3:25 AM
ujjman100
0
Haha lol..,bro Ian Stewart work hard😂and then come to others comment section to solve their problems..
6th May 2020, 3:37 AM
ujjman100