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 details)

Uploaded Source

File details

Details for the file akfraction-0.0.2.tar.gz.

File metadata

  • Download URL: akfraction-0.0.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for akfraction-0.0.2.tar.gz
Algorithm Hash digest
SHA256 5621ee533d7173361c9a9e16c4b949a40ebaddc266f1373ea3e5809c31fb3cb8
MD5 7076583b6fc43888ed6a155007c98ff6
BLAKE2b-256 49a3bf448c32c1c8fbf96718f2d37d8f34ae97c9ca5805c9f3604807424c4453

See more details on using hashes here.

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