Adding problems 23 to 25 in python