Skip to content

Gathondu/Prime-Numbers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PRIME NUMBERS

This is a function that uses the trial division algorithim to determine the primality of a given number.

GETTING STARTED

On your terminal run the following command

git clone https://github.com/andela-gathondu/Prime-Numbers.git

PREREQUISITES

You should have python installed in your machine. If you dont have python installed go to this link Installing Python.

You should also have pytest installed if not follow this link Installing pytest.

Running the test

  1. Open your terminal and go to the directory where you have the project cloned.

  2. On the terminal run this command pytest -v and you should notice that all defined tests pass and an output

    as follows should appear.

    alt text

  3. To try out the program on the console, got tp the terminal still inside the projects' folder and

    follow the process below.

    • type python on the and hit enter key and the following will be displayed depending on your python installation alt text

    • from there import the Prime class using this command from prime import Prime

    • Now you can create an instance of the class and use the primeNumbers() method to get a list of the prime Numbers as shown below.

      alt text

Built With

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages