Skip to main content

A math library

Project description

Hello and Welcome!

About this repository 👀

Pygramer78, created this library in june 2025, with the idea of educational programming implemented to python.
Since i thought of this proyect, i made many stuff, like roman numbers, and all of that.
After all, i ended up using a lot of my time making this.
I hope you like it!

Instructions

Just read the example file.
Or i'll show it to you now. \

from number import *
from coordinates import *
from primes import *
from roman import *
from segments import *
# Known numbers:
print(f"pi number: {PI}")
print(f"euler number: {EULER}")
print(f"golden ratio number: {GOLDEN_RATIO}")
print(f"kaprekar number: {KAPREKAR}")

# Coordinates
coordenate = Coordinates(10, -10)
p = Coordinates(-10, 10)
print(coordenate - p) # Returns another coordinate with the subtraction / adding (coordenate + p)

# Color
color = Color("#911B1B")

# Roman:
roman_Number = Roman("XVII")
print(roman_Number.RomanToDec()) # 17
any_number = 10
print(DecToRoman(any_number)) # X

# Primes:
prime = 17
print(is_prime(prime, [2, 3, 5])) # True (means it's prime)
# The [2, 3, 5] list is another thing which you need to put in there (those are numbers minor than the prime you're checking)
print(generate_primes(40)) # Will generate prime numbers until the parameter you put (must be int) [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]
print(decompose(120)) # Will do a factorial decompose with the number you passed (may take a while)
print(mcm(12, 24)) # Returns the answer to the mcm
print(mcd(12, 24)) # Same as mcm but different operation


# Segments (matplotlib)
segment = Segments([(10, -10), (50, -10)])
segment.draw(color=color)

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

pimath-0.6.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

pimath-0.6.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file pimath-0.6.0.tar.gz.

File metadata

  • Download URL: pimath-0.6.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for pimath-0.6.0.tar.gz
Algorithm Hash digest
SHA256 c37614ab300ac2e263cf191596afc797dfc959e91c60c4a189b8d2d25a086765
MD5 32c924c803abe6237751c83584a11a2e
BLAKE2b-256 eea71b0fe767032ce67bd4da416f10eb07a07da29641ed37c95cc8604a7c4558

See more details on using hashes here.

File details

Details for the file pimath-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: pimath-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for pimath-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3287effb9e3de2f8ef2387ff6f337b4840e097341b89b787866fd87264111d98
MD5 dc1b1272f28e4403eb5e7b23978e628d
BLAKE2b-256 2d2ac4305a1281e884a87feaf15906c22e5f3862acc5a0f69b0e70641fe28f60

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