Add -f for Fraction
This commit is contained in:
parent
8a41031fa8
commit
999fde1c51
@ -126,6 +126,9 @@ class Fraction(object):
|
|||||||
steps += ans_frac.simplify()
|
steps += ans_frac.simplify()
|
||||||
|
|
||||||
return steps
|
return steps
|
||||||
|
|
||||||
|
def __neg__(self):
|
||||||
|
return [Fraction(-self._num,self._denom)]
|
||||||
|
|
||||||
def __mul__(self, other):
|
def __mul__(self, other):
|
||||||
if type(other) == Fraction:
|
if type(other) == Fraction:
|
||||||
|
Loading…
Reference in New Issue
Block a user