added ex6 part 1, euler method for pendulum motion