Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bdr-pro/primeshor

PrimeShor to find factors of a number
https://github.com/bdr-pro/primeshor

Last synced: about 2 months ago
JSON representation

PrimeShor to find factors of a number

Awesome Lists containing this project

README

        

PrimeShor to find factors of a number

**factorize** return a tuple of two prime factors rasie an execption of error or the number is a prime

**isPrime** return true if it is a prime false if it not

```
>>> import prime
>>>
>>> print(prime.isPrime(5))
True
>>> print(prime.factorize(64))
(2, 32)
>>>
```

**Installation**

```
git clone https://github.com/BDR-Pro/PrimeShor

pip install PrimeShor/dist/PrimeShor-1.0.0-py3-none-any.whl

```