Grading System In Javascript With Source Code

Grading System In Javascript With Source Code

In general, the Grading System In JavaScript is the method through which instructors evaluate students’ performance in tests on standard specified scales that are totally based on points and consist of grades like A-F or ranges like 1-10; generally, letters and numbers are used to indicate student grades.

A Grading System Using JavaScript is a method of evaluating a child’s educational performance solely on the basis of points.

This article created using HTML, CSS and JavaScript,

This JavaScript Project With Source Code also includes a downloadable JavaScript source code for free, just find the downloadable source code below and click to start downloading.

I have here a suggested list of Best JavaScript Projects with Source Code Free to download and I’m sure this can help you to improve your skills in JavaScript programming and web development as a whole.

To start executing a   Grading System In JavaScript With Source Code, makes sure that you have any platform in creating a JavaScriptCSS,  bootstrap, and HTML installed in your computer, in my case I will use Sublime Text.

Grading System In Javascript With Source Code: Steps on how to create the project

Time needed: 5 minutes

These are the steps on how to create Grading System In Javascript With Source Code

  • Step 1: Create a folder.

    First, create a folder and named it.
    grading system create folder

  • Step 2: Open the folder in “Sublime Text”.

    Second ,after creating a folder, open it in “sublime text“.
    grading system open folder

  • Step 3: Create a html file.

    Third, create a “html” file and save it as “index.html
    grading system html file

The code given below is for the html module

<!DOCTYPE html>
<html lang="en">
 <head>
   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <title>Grading System in Javascript</title>
 </head>
 <body style="background-color: skyblue">
  <center>
  <h1 style="margin-top: 10px">Grading System in Javascript (IT SOURCECODE)</h1>
</center>
 <div id="main">
  <div id="head"><h1>Grading System In JS</h1></div>
    <label>English</label><input type="text" id="eng"><br>	
    <label>Maths</label><input type="text" id="mat"><br>	
    <label>Physics</label><input type="text" id="phy"><br>	
    <label>Chemistry</label><input type="text" id="chm"><br>	
    <label>Computer</label><input type="text" id="cmp"><br>	
    <br>
 <button class="btn1" onclick="Total()">Total</button>
 <button class="btn2" onclick="Average()">Average</button>
 <button class="btn3" onclick="Grade()">Grade</button>
 </div>
  
  <div id="result">
    <div id="head1"><h1>Total</h1></div>
	<div id="total">
	
   
    </div>
	<div id="head2"><h1>Average</h1></div>
	<div id="avg">
	
	
	</div>
	<div id="head3"><h1>Grade</h1></div>
	<div id="grade">
	
	
	</div>
   </div>
 </body>
 </html>

In the code above given which is the javascript module of the project.

The code given below is for the css module

<style>
   *{
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body{
  background-size: cover;
}

#main {
  width: 40%;
  height: 500px;
  background-color: white;
  text-align: center;
  float: left;
  margin: 40px 10px 0 150px;
}

#head{
   background-color: black;
   width: 100%;
   height: 55px;
   color: white;
   padding: 10px;
   margin-bottom: 50px;
}

#main input{
  height: 30px;
  width: 45%;
  margin-bottom: 10px;
  font-size: 20px;
}

#main label{
  font-size: 23px;
  padding-right: 50px;
  margin-bottom: 10px;
}

.btn1{
  outline: none;
  border: none;
  width: 14%;
  height: 40px;
  margin-right: 30px;
  margin-top: 50px;
  font-size: 22px;
  background-color: teal;
}

.btn2{
  outline: none;
  border: none;
  width: 20%;
  height: 40px;
  font-size: 22px;
  background-color: teal;
  margin-right: 30px;
  margin-top: 50px;
}

.btn3 {
  outline: none;
  border: none;
  width: 14%;
  height: 40px;
  background-color: teal;
  margin-top: 50px;
  font-size: 22px;
}

#result {
  height: 500px;
  width: 30%;
  float: left;
  margin-top: 40px;
  background-color: white;
}

#head1, #head2, #head3 {
  background-color:black;
  width: 100%;
  height: 45px;
  color: white;
  text-align: center;
}

#total {
  height: 200px;
  width: 100%;
  padding: 20px;
  background-color: white;
  font-size: 19px;
  font-weight: 600;
  
}

#grade {
  height: 60px;
  width: 100%;
  padding: 20px;
  font-size: 19px;
  font-weight: 600;
  background-color: white;
}

#avg{
  height: 80px;
  width: 100%;
  padding: 20px;
  font-size: 19px;
  font-weight: 600;
  background-color: white;
}

 </style>

In the code above given which is the css module of the project.

The code given below is for the javascript module

<script>
   function Total(){
  var sub1 = parseInt(document.getElementById("eng").value);
  var sub2 = parseInt(document.getElementById("mat").value);
  var sub3 = parseInt(document.getElementById("phy").value);
  var sub4 = parseInt(document.getElementById("chm").value);
  var sub5 = parseInt(document.getElementById("cmp").value);
  

  if(sub1>100 || sub2>100 || sub3>100 || sub4>100 || sub5>100 )
  {
    alert("Please Enter Marks in range of 100");
  }
  else {
    var total= sub1 + sub2 + sub3 + sub4 + sub5;
    document.getElementById("total").innerHTML = "English Marks :"+sub1+"<br> Maths Marks: "+sub2+"<br> Physics Marks: "+sub3+"<br> Chemistry Marks: "+sub4+"<br> Computer Marks: "+sub5+"<br> Total Marks: "+total;  
  }
}

function Average(){
  var sub1 = parseInt(document.getElementById("eng").value);
  var sub2 = parseInt(document.getElementById("mat").value);
  var sub3 = parseInt(document.getElementById("phy").value);
  var sub4 = parseInt(document.getElementById("chm").value);
  var sub5 = parseInt(document.getElementById("cmp").value);
    
  if(sub1>100 || sub2>100 || sub3>100 || sub4>100 || sub5>100 )
  {
    alert("Please Enter Marks in range of 100");
  }
  else {
    var total= sub1 + sub2 + sub3 + sub4 + sub5;
    var avg=total/5;
    document.getElementById("avg").innerHTML="Your Average marks are: "+avg;
  }
}
  
  
function Grade(){
   var sub1 = parseInt(document.getElementById("eng").value);
  var sub2 = parseInt(document.getElementById("mat").value);
  var sub3 = parseInt(document.getElementById("phy").value);
  var sub4 = parseInt(document.getElementById("chm").value);
  var sub5 = parseInt(document.getElementById("cmp").value);
    
   if(sub1>100 || sub2>100 || sub3>100 || sub4>100 || sub5>100 )
  {
    alert("Please Enter Marks in range of 100");
  }else {
     var total= sub1 + sub2 + sub3 + sub4 + sub5;
     var avg=total/5;
     
     if(avg>=80 && avg<=100)
     {
       document.getElementById("grade").innerHTML="You Got A+ Grade";
     }
     else if(avg>=75 && avg<=80)
     {
       document.getElementById("grade").innerHTML="You Got A+ Grade";
     }
     else if(avg>=70 && avg<=75)
     {
       document.getElementById("grade").innerHTML="You Got A Grade";
     }
     else if(avg>=65 && avg<=70)
     {
       document.getElementById("grade").innerHTML="You Got B Grade";
     }
     else if(avg>=50 && avg<=60)
     {
       document.getElementById("grade").innerHTML="You Got C Grade";
     }
     else if(avg>=40 && avg<=50)
     {
       document.getElementById("grade").innerHTML="You Got C Grade";
     }
     
     else {
       document.getElementById("grade").innerHTML="You Got F Grade";
     }
     
    
  }


}

 </script>

In the code above given which is the javascript module of the project.

Project Output

Grading System In Javascript Output
Grading System In Javascript Output
ABOUT PROJECTPROJECT DETAILS
Project Name :Grading System In Javascript
Project Platform :JavaScript
Programming Language Used:php,javascript,html,css
Developer Name :itsourcecode.com
IDE Tool (Recommended):Sublime
Project Type :Web Application
Database:None
Upload Date:July 27, 2021

Downloadable Source Code

Summary

This JavaScript Project With Source Code is simply in HTMLCSS, and JavaScript. To start creating this Simple Javascript Project With Source Code, make sure that you have basic knowledge in HTMLCSS and Javascript. In this Javascript project also includes a downloadable source code for free.

Related Articles

Inquiries

If you have any questions or suggestions about Grading System In Javascript With Source Code , please feel free to leave a comment below.

2 thoughts on “Grading System In Javascript With Source Code”

  1. Thank you so much itsourcecode God bless you , you help me sure because the grading system is my project topic this year. But it include calculating GPA (grade point average) as well as CGPA ( cumulative grade point average ) how can I calculate it all in one project? .

Leave a Comment