### Particle dynamics, Newton laws

A charged particle (mass $m$, charge $q$) is at rest in an homogeneous magnetic field $\vec {B}=(0,0,B)$. Suddenly, at $t=0$ an electric field $\vec {E}=(0,E,0)$ is switched on. The electric field is suddenly switched off at $t=T/2$, where $T=2\pi/(|q|B/m)$. Describe the motion of the particle. What is its final energy ?