11-1
def printnames(city,country):
return city.title()+","+country.title()
import unittest
from hello_world import printnames
class PrintTestCase(unittest.TestCase):
def test_print(self):
answer=printnames("beijing","china")
self.assertEqual(answer,"Beijing,China")
unittest.main()
11-2
def printnames(city,country,population):
return city.title()+","+country.title()+"-"+str(population)
import unittest
from hello_world import printnames
class PrintTestCase(unittest.TestCase):
def test_print(self):
answer=printnames("santiago","chile",5000000)
self.assertEqual(answer,"Santiago,Chile-5000000")
unittest.main()