Dawid J. Kubis 5 years ago
parent c2de43c2d3
commit b5c8959675

@ -27,7 +27,10 @@ class Fraction:
self.up = self.up // divisor # znena sebe sama self.up = self.up // divisor # znena sebe sama
self.down = self.down // divisor # a zase self.down = self.down // divisor # a zase
self.base() # rekurze, slo by to udelat i snadneji if self.up < 0 and self.down < 0:
self.up = -self.up
self.down = -self.down
# scitani zlomku # scitani zlomku
def add(self, other): def add(self, other):

@ -25,7 +25,10 @@ class Fraction:
self.up = self.up // divisor # znena sebe sama self.up = self.up // divisor # znena sebe sama
self.down = self.down // divisor # a zase self.down = self.down // divisor # a zase
self.base() # rekurze, slo by to udelat i snadneji if self.up < 0 and self.down < 0:
self.up = -self.up
self.down = -self.down
# scitani zlomku # scitani zlomku
def add(self, other): def add(self, other):

Loading…
Cancel
Save