####: Victor Ngava
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.
- Challenge 1:
- Call generateGrade function with the student's marks to get the corresponding grade.
- Challenge 2:
- Call speedDetector function with the car's speed to get demerit points or 'License suspended'.
- Challenge 3:
- Call calculateNetSalary function with the basic salary and benefits to get the salary details.
-[https://github.com/Victorngava] [email protected]
MIT License
Copyright (c) 2024 Victorngava
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.