completed part 10 in python