Using the modulo ( % ) operator If a number is divided by 1, the remainder will be the fractional part. So, using the modulo operator will give the fractional part of a float.