In this code challenge, we have a list of six toy problems that i have made codes for them to generate output;
-
studentGradeGenerator.js - This code generates grades of students by just entering their marks.
-
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) # ## ###
-
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”.
-
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.
- https://www.aren.co.ke/payroll/taxrates.htm Links to an external site.
-
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.
-
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]
This application has been built using the following tools;
-
Node
v18.18.0
-
Git
2.42.0
You can setup this repository using the folliwing manual
- Cloning the repository
[email protected]:Mpoelesiamon/W1CodeChallenge.git
- Ensure the NVM libraries are set up in your machine
node v18.18.0
- Run the application
weekone code challenge
- Open the repository from the browser with this link.
https://github.com/Mpoelesiamon/W1CodeChallenge
Mpoelesiamon
This project is licenced under MIT Licence