barangievans / phase-1-array-iterator-methods

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Week 1 Toy problems Prerequisites

Prerequisites

  1. Create a repository on your GitHub account.

    NB: One folder, with 3-4 files for each solution. Please note that a single file should only hold one solution.

  2. Use JavaScript to wire down the 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.

Challenges

Challenge 1: Student Grade Generator (Toy Problem)

Write a function that prompts the user to input student marks. The input should be between 0 and 100. The output should correspond to the correct grade, as shown below:

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

Challenge 2: Speed Detector (Toy Problem)

Write a program that takes the speed of a car as input, e.g., 80. If the speed is less than 70, it should print “Ok”. Otherwise, for every 5 km/h 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 calculating an individual’s Net Salary by getting basic salary and benefits inputs. Calculate the payee (i.e., Tax), NHIF Deductions, NSSF Deductions, gross salary, and net salary.

Hosted Solution

Repository link:https://barangievans.github.io/phase-1-array-iterator-methods/

About

License:Other


Languages

Language:HTML 59.1%Language:JavaScript 40.9%