Calculating P.E and K.E