classic computer science problems in python