Program Assignment python

Program Assignment python

Use the fraction.py

  1. Modify the Constructor for the Fraction class so that GCD is sued to reduce fractions immediately. This means that the __add__ function no longer needs to reduce.
  2. Implement the remaining simple arithmetic operators (__sub__, __mul__, and __truediv__).
  3. Implement the remaining relational operators (__gt__, __ge__, __lt__, __le__, and __ne__).
  4. Modify the constructor for the Fraction class so that it checks to make sure that the numerator and denominator are both integers. If either is not an integer the constructor should raise an exception.

"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.


Discount Code: CIPD30



Click ORDER NOW..

order custom paper