Python 2.7 defaults to integer division, so
energy = 1 / 2 * mass * vellocity ** 2
is equivalent to
energy = (1 // 2) * mass * velocity ** 2 = 0 * mass * velocity ** 2 = 0
To default to floating point division, place the following line at the top of your script:
from __future__ import division
or simply write energy
as:
energy = 0.5 * mass * velocity ** 2