Python programs for my algorithm's class