problem072 first attempt in python