Skip to main content

A simple package that provides you math types like fraction

Project description

mathtypes

A simple package that provides you math types like fraction

Installation

pip install mathtypes

Usage

Example 1:

from mathtypes import Fraction
print(Fraction(1, 2) + Fraction(1, 3))

Output:

56

Example 2:

from mathtypes import Fraction
print(Fraction(4, 4) + Fraction(4, 8))

Output:

16
──
8

You can use .toLowestTerm to convert fraction into its lowest term

For Example

from mathtypes import Fraction
a = Fraction(2,4)
a.toLowestTerm()
print(a)

Output:

12

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

mathtypes-0.1.2.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mathtypes-0.1.2-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

Details for the file mathtypes-0.1.2.tar.gz.

File metadata

  • Download URL: mathtypes-0.1.2.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for mathtypes-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d0cf4166e20eda7097ea85d4b52b5d96c944c5b647b502420e2296712eb9986d
MD5 b7d424c4e8911701a369d39445ad7863
BLAKE2b-256 020d773800109207fb8bbfb78d6d466e1f8955c9fa0bb5195390854561869113

See more details on using hashes here.

File details

Details for the file mathtypes-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: mathtypes-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 2.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for mathtypes-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 86b7259e23c6d94525d62defe799c7b50541dd09639c608956b9151ed47afc5b
MD5 fc57c24cf0e884743f42e1a4c1486765
BLAKE2b-256 f6a7a8c762ac9be98a93c1ac3b18c81994627695250fe295bc15313622a2a8d1

See more details on using hashes here.

Supported by

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