Spaces:
Sleeping
Sleeping
File size: 595 Bytes
9df0420 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
from .fraction_operations import FractionOperations
def main():
fraction_operations = FractionOperations()
fraction1 = Fraction(1, 2)
fraction2 = Fraction(1, 3)
result = fraction_operations.add_fractions(fraction1, fraction2)
if result:
print("Result:", result)
else:
print("Errors:", fraction_operations.get_errors())
result = fraction_operations.divide_fractions(fraction1, Fraction(0, 1))
if result:
print("Result:", result)
else:
print("Errors:", fraction_operations.get_errors())
if __name__ == "__main__":
main() |