Exercise 1.7 and 1.8 - finding root and cube-root