Demo Package for Mathematical Factors.
Project description
A new library to handle all sorts of mathematical factors of a number. From finding sum of factors to finding prime factors. Number of built-in functions added for the library are: nfact() -> Finding the number of factors for the given number. Returns 'None' if there's no factor for the number else returns the number of factors. sfact() -> Finding the sum of factors for the given number. Returns -1 if there's no factor for the number else returns the sum of factors. fact() -> Gives the list of factors for the given number, returns -1 if there's no factor for the number. efact() -> Gives the list of even factors for the given number, returns -1 if there's no factor for the number. ofact() -> Gives the list of odd factors for the given number, returns -1 if there's no factor for the number. pfact() -> Gives the list of prime factors for the given number, returns -1 if there's no factor for the number. sum_efact() -> Returns the sum of even factors for the given number, returns -1 if there's no factor for the number. sum_ofact() -> Returns the sum of odd factors for the given number, returns -1 if there's no factor for the number. sum_pfact() -> Returns the sum of prime factors for the given number, returns -1 if there's no factor for the number. import factors.factors as f f.fact(10) -> [1, 2, 5, 10] (Output).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for math_factors-1.0.2-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a08ac4c57ece6311a21e7b30310261f78daef22254d74bfe306615ea5a6cd05b |
|
MD5 | dfea7beb4e9666475aa18e9e20d5443c |
|
BLAKE2b-256 | dc5f1e456179626a0e80ad2c666bbe0067a814be1b729be2b87b0ce015c8eb15 |