GithubHelp home page GithubHelp logo

slc-day-0's Introduction

Bootcamp Day 1

Introduction

This project creates 3 functions and their respective tests to cover the learning outcome for the first day of the scintillating Andela cycle XXI bootcamp. The functions are:

  • fizzBuzz
  • aritGeo
  • getPrimes

function fizzBuzz()

The fizzBuzz function returns 'Fizz', 'Buzz', 'FizzBuzz', or the argument it receives, all depending on the argument of the function, a number that is divisible by, 3, 5, or both 3 and 5, respectively. When the number is not divisible by 3 or 5, the number itself is returned.

function aritGeo()

The aritGeo function takes one argument, an Array, and checks if the array passed as an argument is an arithmetic progression, geometric progression, or neither an arithmetic nor a geometric. It also checks whether the array is empty. For arithmetic progressions, arithGeo returns Arithmetic. For geometric progressions, aritGeo returns Geometric. For neither of the above, aritGeo returns -1. For an empty array, aritGeo returns 0.

function getPrimes()

The getPrimes function takes an integer value n as argument and generates prime numbers from 0 to n with asymptotic analysis. The generated prime numbers should are in an array. If no prime number is obtainable for the input, getPrimes returns an empty array. Edge cases such as invalid input, negative input value, or zero as input are also addressed.

Test

To run the test

  • Clone the repository by running the command git clone https://github.com/baasbank/SLC-DAY-0.git
  • Navigate to the folder by running the command cd SLC-DAY-0
  • Install the project dependencies by running the command npm install
  • Navigate into each folder to run each test, for example to run the aritGeo test, run the command
    • cd aritGeo
    • jasmine

Technology

Node

Author

Baasbank Akinmuleya

slc-day-0's People

Contributors

baasbank avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.