How to compare floats and ints

Thanks for the suggestion on the light sensor, however right now i am more concerned with the weight value being read properly