Redone problem 28 (???), problem 12 with python