fract_to_dec.py - Get the numerator numerator =...

This preview shows page 1 out of 1 page.

# Get the numeratornumerator = int(input("what is the numerator?"))# Get the denominatordenominator = int(input("What is the denominator?"))# convert the fractiondecimal = numerator/denominatorfraction = str(numerator) + "/" + str(denominator)# Print the fraction and decimal valueprint(fraction + " = " + str(decimal))"""what is the numerator?2What is the denominator?32/3 = 0.6666666666666666""""""

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture