import fractions for n in [0.2, 0.7, 6.5, 6.0]: print('{} = {}'.format(n, fractions.Fraction(n)))