Added problems 6 and 7 in python