Preetham's attempt at these two exercises