CODE-CHALLANGE
DESCRIPTION This is a practice code challange
GETTING STARTED In order for you to use the conted of this repo,follow the following
Open a terminal / command line interface on your computer
-
Clone the repo by using the following:
git clone https://github.com/Barsu5489/Toy-Problem.git
-
Be patient as it creates a copy on your local machine for you.
-
Change directory to the repo folder:
cd Toy-Problem
-
Open it in
Visual Studio Code
code .
-
Run
npm install
GOALS
Writing a programe that calculates the grades of the students
Writting a program that detects the speed of the car
Writing a prigrame thatcalculates the net salary ofan indiviual
CHALLANGE 1; GRADE CALCULATOR
The programme prompts the user to input student marks. The input should be between 0 and 100. Then output the correct grade uuing the if else statement. Enter the student marks and the program will generate the grade.
Test the code by running node grade.js in terminal Make sure file is opened in intergrated terminal before running node grade.js
CHALLANGE 2; SPEED DETECTOR
The program inputs the speed of the a car. 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.
Test the code by running node speed.js in terminal Make sure file is opened in intergrated terminal before running node speed.js
CHALLANGE 3; NET SALARY CALCULATOR
A program whose major task is to calculate an individual’s Net Salary by getting the inputs of basic salary and benefits. Calculates the payee (i.e. Tax), NHIFDeductions, NSSFDeductions, gross salary, and net salary
KRA, NHIF and NSSF values ar provide in th link: https://www.aren.co.ke/payroll/taxrates.htm Links to an external site.
Test the code by running node salary.js in terminal Make sure file is opened in intergrated terminal before running node salary.js
AUTHOR This project was written by:
- Emmanuel Barsosio
LICENCE This project is licenced under Apache 2.0