Short and sweet ladies and gents, here’s the solution to the HW1 assignment:
This code takes the Russian Peasant’s algorithm and stores it in a module called ‘fake database’. This script also simulates an app server that caches results from the fake database, and returns results requested by the function ‘multiply handler’. It also prints out the last five results stored in the cache. This lesson was simply about learning how to leverage modules. Not groundbreaking, but a decent exercise, and it sets up the rest of the work that I’ll be covering in section 3 of the course.