Physics Question Help please!!!?

A 3.70 kg mass attached to a spring oscillates with a period of 0.375 s and an amplitude of 17.0 cm.

(a) Find the total mechanical energy of the system

1 answer

w=sqrt(k/m)
so k= m w^2
at time=0

PE= 1/2 k x^2= 1/2 .17^2 w^2 m
and that is total energy when at t=0, velocity is zero.