Solutions to 17-19

In python