TORONTO KIDS COMPUTER CLUB | Aurora Wednesday 18:30 Python Practice 21.09.15.
19911
post-template-default,single,single-post,postid-19911,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.8.0,vc_responsive

Aurora Wednesday 18:30 Python Practice 21.09.15.

20 Sep Aurora Wednesday 18:30 Python Practice 21.09.15.

Question 1:

Since we have made gcd method, continue complete the Fraction class, so the __add__ result would be the simplified result.

We have known the __add__(self, other) to get called on add operation using + operator.

please finish the following math methods of Fraction class:
__sub__(self, other) To get called on subtraction operation using – operator.
__mul__(self, other) To get called on multiplication operation using * operator.
__truediv__(self, other) To get called on division operation using / operator.

No Comments

Sorry, the comment form is closed at this time.