Kombobill / code-week-challenge-one-

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WK1-code-challenge

#DESCRIPTION

Explanation on how to run the code for three different code challenges so as to get the correct output.

GETTING STARTED

For you to use the content on this repo ensure you have the following:

1.A computer that runs on either of the following; (Windows 7+, Linux, Mac OS)

2.nodejs 9.0+

#RUNNING THE APPLICATION

There are three challenges, we will three run three different applications to obtained required results.

CHALLENGE 1: STUDENT GRADE GENERATOR (TOY PROBLEM)

Write that prompts the user to input student marks. The input should be between 0 and 100. Then output the correct grade: A > 79, B - 60 to 79, C - 59 to 49, D - 40 to 49, E - less 40.

#RUNNING CHALLENGE ONE

Call the function , console.log(grade_generator()) where the grade input will go in between the brackets attached to the function .Then run node index.js or npm start to see the output of said function.

CHALLENGE 2:SPEED DETECTOR(TOY PROBLEM)

Write a program that takes as input the speed of a car 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. 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”.

#RUNNING CHALLENGE TWO

Call the function, console.log(speed_detector()); where the speed input will go in between the brackets attached to the function.Then run node index.js or npm start see the output of said function.

CHALLENGE 3:NET SALARY CALCULATOR(TOY PROBLEM)

Write a program whose 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), NHIFDeductions, NSSFDeductions, gross salary, and net salary.

#RUNNING CHALLENGE THREE

Call the function , console.log(Salary()); where the salary and benefits input will go in between the brackets attached to the function.Then run node index.jsor npm start to see the output of said function.

Author

This project was contributed to by:

[Billgates kombo]

License

This project is licensed under ISC.

About


Languages

Language:JavaScript 100.0%