Week 13: Exercises

1. Northern and Southern Cities

Write a program that reads city data from the file cities.csv mentioned in the lecture notes. The program should find the 5 northernmost and 5 southernmost cities with a population of at least 100,000. For each such city, write its name, latitude, and population to standard output.

2. Testing Tic-Tac-Toe

Revisit the model class for Tic-Tac-Toe that we saw in a previous lecture. Write a file tic_tac_test.py that contains a series of unit tests for the model class. Run the tests using pytest and ensure that they all pass.