Skip to content

NateNjuguna/andela_D0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Day 0 of Andela Bootcamp XIV

 Clone this repo using the link above

Test Driven Development

Python prime number generator

$ cd andela_D0
andela_D0$ pytest

Asymptotic Analysis

Python prime number generator

*** Requires library big_o installed *** from here

$ cd analysis
andela_D0$ python prime.py
Achieved 
*Best Case*
    Logarithmic: time = 0.72 + -0.002 log(n)
*Other Results*
Cubic: time = 0.7 + -3.3E-18 n^3    (res: 0.00029)
Polynomial: time = -0.33  x^-0.0029    (res: 0.00029)
Constant: time = 0.7    (res: 0.0003)
Linear: time = 0.7 + -7.5E-08 n    (res: 0.00024)
Linearithmic: time = 0.7 + -6.2E-09 n log(n)    (res: 0.00025)
Exponential: time = -0.35  ( -1.1E-07^n  )  (res: 0.00049)
Logarithmic: time = 0.72 + -0.002 log(n)    (res: 0.00014)
Quadratic: time = 0.7 + -4.7E-13 n^2    (res: 0.00027)

About

Andela Day 0 Bootcamp Activity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages