Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

Code-challenge

Prerequisite

  1. Create a repository on your GitHub account.
  2. Use Javascript to wire down the solution. NB: Use one folder, with 3 files for each solution. Please note that a single file should only hold one solution.
  3. Push the solution to the above repository once done.
  4. Submit the repository link for grading.
  5. Ensure your repository has a well written README. HereLinks to an external site. is a link to a readme template that you can use

NOTE: You are required to complete ALL the challenges

Challenge 1: Student Grade Generator (Toy Problem) Write a program 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 - 49 to 59, D - 40 to 49, E - less 40.

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”.

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. NB: Use KRA, NHIF, and NSSF values provided in the link below.

https://www.aren.co.ke/payroll/taxrates.htmLinks to an external site.

https://www.kra.go.ke/en/individual/calculate-tax/calculating-tax/payeLinks to an external site.

Rubric Some Rubric Some Rubric Criteria Ratings Pts This criterion is linked to a Learning OutcomeGitHub Repository Your code has been pushed to a GitHub Repository. 1 pts Full Marks Repo is present. 0 pts No Marks No repository 1 pts This criterion is linked to a Learning OutcomeREADME file The repository has a well-written README file. 3 pts Full Marks Repository contains the following: 1. Title 2. Description 3. Project Setup 4. Author & License 2 pts Partial Repository has: 1. Title 2. Description 1 pts Partial Repository has an empty README. 0 pts No Marks No README present 3 pts This criterion is linked to a Learning OutcomeCode Comments Code has been properly commented. 2 pts Full Marks All the implemented solutions have been well commented. 1 pts Partial Some solutions do not have well commented code. 0 pts No Marks No comments at all. 2 pts This criterion is linked to a Learning OutcomeWorking Solution Solutions for the challenges. 9 pts Full Marks Full implemented solutions. 6 pts Partial Two among the three solutions are working as expected. 3 pts Partial One among the three solutions is working as expected. 0 pts No Marks No solution of the three is working. 9 pts Total Points: 15

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors