Skip to content

This repository contains three JavaScript programs; a student grade generator program, a speed detector program and a net salary calculator program.

Notifications You must be signed in to change notification settings

cyndimustapha/phase-1-wk1-Code-Challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

phase-1-wk1-Code-Challenge

Date, 22/03/2024

By Cyndi Marren Mustapha

Student Grade Calculator

This is a JavaScript program that calculates the grade of a student based on their marks. It prompts the user to input the student's marks (between 0 and 100) and outputs the corresponding grade according to the following criteria:

  • A > 79
  • B: 60 to 79
  • C: 49 to 59
  • D: 40 to 49
  • E: less than 40

Speed Detector

This is a simple JavaScript program that calculates demerit points for speeding violations based on the speed of a car. The program takes the speed of a car as input and determines the demerit points according to the following rules:

  • If the speed is less than 70 km/h, it prints "Ok".
  • If the speed is 70 km/h or more, for every 5 km/h above the speed limit (70 km/h), it assigns one demerit point.
  • If the total demerit points exceed 12, the program prints "License suspended".

Net Salary Calculator

This is a JavaScript program to calculate an individual's net salary based on their basic salary and benefits, taking into account tax rates and deductions provided by KRA, NHIF, and NSSF. The program includes functions that:

  • Calculates PAYE tax based on provided tax bands and relief.
  • Determines NHIF deductions according to the gross salary range.
  • Computes NSSF deductions based on the employee contribution rate.
  • Provides the net salary after deducting PAYE, NHIF, and NSSF deductions.

Installation

You use git clone to be able to download the documents in the GitHub

Installation Requirements

Git

Installation instruction

Git clone https://github.com/cyndimustapha/phase-1-wk1-Code-Challenge.git

Live Link

https://cyndimustapha.github.io/phase-1-wk1-Code-Challenge/

Technologies used

Javascript

Support and contact details

https://github.com/cyndimustapha

License

The content of this site is licensed under the MIT license Copyright (c) 2018.

About

This repository contains three JavaScript programs; a student grade generator program, a speed detector program and a net salary calculator program.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published