Add problem 5 in python
remove a DRYless C code