def hamiltonian(pos, vel, energy_fn):
 return (energy_fn(pos) + kinetic_energy(vel))

def hamiltonian ( pos , vel , energy_fn ) : return ( energy_fn ( pos ) + kinetic_energy ( vel ) )
returns the hamiltonian for the given velocity and position .