Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Examples

Table of Contents:

Find all factors

  • Find all factors of a number n.
  • Factors must lie between 1 and n.

Check Code Here: factors_of_n.py

Primes

  • Prime number - only factors are 1 and the number itself.

eg:

factors(17) is [1, 17].

factors(18) is [1, 2, 3, 6, 9, 18].

Check Code Here: is_prime.py

Primes up to n

  • List all primes below a given number.

Check Code Here: primes_upto_n.py

First n Primes

  • List the first n primes.

Check Code Here: first_n_primes.py