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.8.0.tar.gz (5.6 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.8.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pimath-0.8.0.tar.gz
Algorithm Hash digest
SHA256 883a9ce047135a8417df897cac2166ba11d24f7268dcb8757162c81cb5c52806
MD5 587533ee12abb8d2940c648fc52d7167
BLAKE2b-256 6fc55ece3a2bb8624e05878c81c22b3f3e1e7e64f0eba005a9435b499b2fb0d5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pimath-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 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.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc3f5911581ee2732c5793a60d1cd5de3585ba2a55eb16f1cf2122f8007a3bb1
MD5 602269bfde65961948feb9bde3d30931
BLAKE2b-256 83e2e2932d0325f9a2aea7b5cc06534c8f2974db96153d093de79891f19ecf6f

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