Fraction by Ms.Charawi Detphumi
Project description
ShabiiFraction is a Python library for dealing with arithmetic operation of fractions.
Installation
Use the package manager pip to install ShabiiFraction.
pip install ShabiiFraction
Usage
from ShabiiFraction 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.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ShabiiFraction-0.0.2.tar.gz
(3.1 kB
view details)
File details
Details for the file ShabiiFraction-0.0.2.tar.gz
.
File metadata
- Download URL: ShabiiFraction-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.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 826d7c1254af4bcf56a93af6142e633a2c59fe29b731ce0d53e76499b1ad629f |
|
MD5 | 43153b388a599a8815453d088660da4f |
|
BLAKE2b-256 | ac0ab5ca7959c1a6c93dad5a1f54b3724116ee6173eaf14f86ff70417eccc7fa |