fraction_to_mixed_numbers

def fraction_to_mixed_numbers(numerator, denominator)

Simplifies a fraction to its lowest terms and returns it as a mixed number.

Arguments:

  • numerator int - The numerator of the fraction.
  • denominator int - The denominator of the fraction.

Returns:

  • str - The simplified fraction as a string. If the fraction is already an integer, it returns the integer as a string. If the fraction is a proper fraction, it returns the mixed number representation as a string. If the numerator or denominator is not an integer, it returns an error message. If the denominator is zero, it returns an error message.