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.5.0.tar.gz (4.9 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.5.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pimath-0.5.0.tar.gz
Algorithm Hash digest
SHA256 60ef4ea207242a599b36b8313ec3ab88f81dca8652db8f3566f32f6ffa1d19e3
MD5 1aa68fb88affae45493bca3638ab17eb
BLAKE2b-256 c5076c84486c987133d651ba0f4602fa562e5b9713bdef158c69c237c4b9aec1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pimath-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 6.5 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.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c25e5f7ebbdc4e50f3eaee7f631e5ecbb87bdc535592fba4055f9e847ac08c60
MD5 65c34b3c520f150dce70ef647f220900
BLAKE2b-256 e0c81f94d81241d67b691b39948e90a88c5b27106f5423ee296f8a907a5af392

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