problem three, python