We know that eV0=Kmax=hv−ϕ where, ϕ is the work function. X-rays have higher frequency (v) than ultraviolet rays. Therefore as v increases K.E and V0 both increases. The kinetic energy ranges from zero to maximum because of loss of energy due to subsequent collisions before getting ejected.