TORONTO KIDS COMPUTER CLUB | PMCA Sunday 10:00 Practice -32.
post-template-default,single,single-post,postid-18871,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

PMCA Sunday 10:00 Practice -32.

17 Dec PMCA Sunday 10:00 Practice -32.


Please modify the fraction class we made in the class by adding a method called add(). The method will take 2 arguments top and bottom like:

def add(self, top, bottom):

so the fraction object can add another fraction top and bottom number, such as:

a = Fraction(3, 5)
a.add(1, 6)

it will display 23 / 30

No Comments

Sorry, the comment form is closed at this time.