Question: Write python code Write a program that prompts for the numerator and denominator of a fraction as integers, and then prints the decimal equivalent of
Write python code
Write a program that prompts for the numerator and denominator of a fraction as integers, and then prints the decimal equivalent of the fraction.
Print only up to 2 decimal places in the fractional part.
Ensure that your program does not fail if the user enters a denominator of 0.
If the user enters a numerator of 1 and a denominator of 3, then your program would print 0.33.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
