Challege4 in Python