python ex2 and ex3

Keep on learning