patlub / Andel-SLC-Day-1

Solutions to assignments for Andela Self Learning Clinic Day 1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generate Prime Numbers

A function to generate prime numbers from 0 to n. n representing the upper limit

Getting Started

You can start by cloning the project:

git clone https://github.com/patlub/Andel-SLC-Day-1.git

Prerequisites

Working installation of python 3. if you don't, you can refer to this Intall Python 3

Usage

import it first:

from Andela-SLC_Day-1 import generate_primes

then just call it directly, for example:

generate_primes(10) returns [2, 3, 5, 7]

Running the Tests

Navigate into the project directory and type:

python test_prime_numbers.py

You should see:

All 7 tests passed

Enjoy.

About

Solutions to assignments for Andela Self Learning Clinic Day 1


Languages

Language:Python 100.0%