Skip to main content

Fraction by Mr.Adisak

Project description

akfraction is a Python library for dealing with arithmetic operation.

Installation

Use the package manager pip to install akfraction.

pip install akfraction

Usage

from akfraction import Fraction

a,b,c,d = [int(e) for e in input().split()]
fraction1 = Fraction(a,b)
fraction2 = Fraction(c,d)
print(f"fraction1 = {fraction1}")
print(f"fraction2 = {fraction2}")
print(f"fraction1+fraction2 = {fraction1+fraction2}")
print(f"fraction1-fraction2 = {fraction1-fraction2}")
print(f"fraction1*fraction2 = {fraction1*fraction2}")
print(f"fraction1/fraction2 = {fraction1/fraction2}")

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Author

Adisak Karnbanjong

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

akfraction-0.0.2.tar.gz (3.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page