Kat-Kimani / Code-Challenge-1

Weekend code challenge 17th to 19th March 2023

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code_challenge

YOUR README DESCRIPTION STARTS HERE

STUDENT GRADE GENERATOR DESCRIPTION This is a simple web application that generates a grade based on marks scored.

How to Use our simple calculator. Simply enter the marks in the input field and click the "Get Grade" button. The application will show you what grade was achieved by the respective marks

A: 80-100 B: 60-79 C: 50-59 D: 40-49 E: < 40

If the input is not a number or falls outside of these ranges, the application will display an error message. Invalid Output

Technologies Used This application was built using HTML, CSS, and JavaScript.

PROJECT SET UP To set up this project, you will need to have the following installed:

A web browser such as Google Chrome, Mozilla Firefox, or Microsoft Edge A text editor such as Visual Studio Code, Atom, or Sublime Text

To run the project, follow these steps:

  1. Fork the lesson from github and clone to your local machine
  2. OR create a new file on your text editor
  3. Save the file with a .html extension (e.g. "index.html").
  4. Open the file in your web browserusing explorer.exe index.html
  5. You should now see a simple webpage with an input field and a button.
  6. You can enter MARKS in the input field and click the button to see the GRADE ACQUIRED or an error message if invalid output is given message asking you to provide valid input. marks can only range from 1 to 100.


THE SPEED CALCULATOR DESCRIPTION The code provided is a basic implementation of a speed detector using JavaScript & HTML

The HTML provides an input field for the user to enter the speed and a submit button that triggers the JavaScript code to calculate the number of demerit points, if the speed given is above the allowed 70KPH. It also goes ahead to advice whether the license should be suspended if the demerit points exceed 12points.

The JavaScript code includes an event listener that listens for a "click" event on the submit button. When the button is clicked, the code gets the input speed value entered by the user, converts it to an integer using parseInt(), and passes it to the speedCheck() function to calculate the number of demerit points or whether the license should be suspended.

The speedCheck() function uses a formula to calculate the demerit points and some conditional statements to determine the output.

Finally, the output is displayed on the web page using the document.getElementById() method to access the HTML element with the id "speed-id" and the append() method to add any text given in the final output to the element.

The code can be improved by adding error handling, better user interface design, and more features to enhance the functionality of the speed detector.

PROJECT SET UP To set up this project, you will need to have the following installed:

A web browser such as Google Chrome, Mozilla Firefox, or Microsoft Edge A text editor such as Visual Studio Code, Atom, or Sublime Text

To run the project, follow these steps:

  1. Fork the lesson from github and clone to your local machine
  2. OR create a new file on your text editor
  3. Save the file with a .html extension (e.g. "index.html").
  4. Open the file in your web browserusing explorer.exe index.html
  5. You should now see a simple webpage with an input field and a button.
  6. You can enter a speed value in the input field and click the button to see the demerit points or "Ok" message displayed on the page.
  7. License suspended will display if the speed is too high calculating more that 12 demerit points

NET SALARY CALCULATOR DESCRIPTION

This is a salary calculator web application that calculates the net salary of an employee based on their gross salary, tax deductions, and other deductions such as NSSF and NHIF. It is built using HTML, CSS, and JavaScript.

Features Input field for user to enter gross salary Calculates tax deductions (PAYE) based on taxable income Calculates NSSF and NHIF deductions based on gross salary Displays the net salary after all deductions have ben made to the user can be useful to help you calculate desired salary as a net of all statutory deductions.

PROJECT SET UP To set up this project, you will need to have the following installed:

A web browser such as Google Chrome, Mozilla Firefox, or Microsoft Edge A text editor such as Visual Studio Code, Atom, or Sublime Text

To run the project, follow these steps:

  1. Fork the lesson from github and clone to your local machine
  2. OR create a new file on your text editor
  3. Copy and paste the code you provided into the new file.
  4. Save the file with a .html extension (e.g. "index.html").
  5. Open the file in your web browserusing explorer.exe index.html
  6. You should now see a simple webpage with an input field and a button.
  7. You can enter a speed value in the input field and click the button to see the demerit points or "Ok" message displayed on the page.
  8. License suspended will display if the speed is too high calculating more that 12 demerit points

Authors This application was developed by [kat Kimani]. If you have any questions or feedback, please feel free to contact me through my github kat-kimani.

License This project is licensed under the GIT License. See the LICENSE file for details.

About

Weekend code challenge 17th to 19th March 2023


Languages

Language:JavaScript 67.6%Language:HTML 32.4%