Classical Dynamic Programming Problems in Python