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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!