Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Python Write a program which adds two fraction using functions as described below: getFrac: Asks the user to enter the numerator and the denominator of
Python
Write a program which adds two fraction using functions as described below: getFrac: Asks the user to enter the numerator and the denominator of the fraction and returns these integers to the calling program. o addFrac: Receives numerators and denominators of two fractions as arguments and returns the numerator and denominator of the sum of the two fractions. o prnFrac: Receives the numerator and the denominator of a fraction and prints numerator/denominator to the screen. main: Asks the user to enter two fractions using the getFrac function, adds these two fractions using the addFrac function, then prints the sum to the screen using the prnFrac function. The program output should be displayed exactly as shown in the example outputs below depending on what user enters. Do not simplify the fraction. Enter numerator: 1 Enter denominator: 3 Enter numerator: 1 Enter denominator: 2 1/3+1/2 = 5/6 Enter numerator: 2 Enter denominator: 3 Enter numerator: 5 Enter denominator: 6 2/3 + 5/6 = 27/18 YantnzStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started