Skip to content

Mpoelesiamon/W1CodeChallenge

Repository files navigation

TITLE

In this code challenge, we have a list of six toy problems that i have made codes for them to generate output;

  1. studentGradeGenerator.js - This code generates grades of students by just entering their marks.

  2. stairCase.js - This code takes an integer and console logs a step shaped stair with the integer levels using the # character to give us the output as shown below, e.g steps(2) # ##

    steps(3) # ## ###

  3. speedDetector.js - This code that takes the speed of a car as input e.g 80. If the speed is less than 70, it should print “Ok”. Otherwise, for every 5 km/s above the speed limit (70), it should give the driver one demerit point and print the total number of demerit points. An exxample shown below.

    e.g. For example, if the speed is 80, it should print: “Points: 2”. If the driver gets more than 12 points, the function should print: “License suspended”.

  4. netSalaryCalculator.js - This codes' major task is to calculate an individual’s Net Salary by getting the inputs of basic salary and benefits. Calculate the payee (i.e. Tax), NHIF Deductions, NSSF Deductions, gross salary, and net salary. It's values were retrieved from the links below.

  1. cylinderVolume.js - THis code gets the volume of a Cylinder with four decimal places using object classes. Volume of a cylinder : V = πr2h where r is the radius and h is the height of the cylinder.

  2. bubbleSort.js - This code takes an array of numbers as input. It should output an array of those same numbers sorted from lowest to highest as shown below. sample input = [5,6,1,3,4,2] Expected output = [1,2,3,4,5,6]

Description/ Technologies Used

This application has been built using the following tools;

  • Node v18.18.0

  • Git 2.42.0

Setup Instructions

You can setup this repository using the folliwing manual

  1. Cloning the repository
git@github.com:Mpoelesiamon/W1CodeChallenge.git
  1. Ensure the NVM libraries are set up in your machine
node v18.18.0
  1. Run the application
weekone code challenge
  1. Open the repository from the browser with this link.
https://github.com/Mpoelesiamon/W1CodeChallenge

Author

Mpoelesiamon

Licence

This project is licenced under MIT Licence

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published