Skip to main content

Functions for dealing with primes

Project description

A collection of functions that are helpful for dealing with prime numbers

isPrime(n) takes a number and returns true if it is a positive integer and prime.

factors(n) takes a number and returns a list of its factors (or the factors of the number truncated), including repetition

primes(n) returns a list of all primes less than n (if n is positive)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
primes_gpavel-1.2.zip (1.7 kB) Copy SHA256 hash SHA256 Source None Dec 8, 2012

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page