Non-academic coding homework in python