Question: In a new, empty . py fIle, import the Fraction module ( from fractions import Fraction ) and then create a Fraction object equal to
In a new, empty py fIle, import the Fraction module from fractions import Fraction and then create a Fraction object equal to onehalf ie Then, using a loop add to this fraction the next values in the sequence etc. Print the new value of the fraction after the addition at each step of the loop. If you kept on going, would the value of your fraction ever reach Try changing the loop to a bigger value to find out!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
