[CODE lang="html" title="grade calc"]<!DOCTYPE html>
<html>
<head>
<title></title>
<link href="https://fonts.googleapis.com/css?family=Righteous&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css">
<style>
body {
background-image: url("Act3/img/grades.jpg");
background-position: center;
height: 500px;
font-size: 12px;
}
body, button, input {
font-family: 'Righteous', cursive;
font-weight: 700;
letter-spacing: 1.4px;
}
.background {
display: flex;
min-height: 100vh;
}
.container {
flex: 0 1 700px;
margin: auto;
padding: 10px;
}
.screen {
position: relative;
background: #3e3e3e;
border-radius: 15px;
}
.screen:after {
content: '';
display: block;
position: absolute;
top: 0;
left: 20px;
right: 20px;
bottom: 0;
border-radius: 15px;
box-shadow: 0 20px 40px rgba(0, 0, 0, .4);
z-index: -1;
}
.screen-body {
display: flex;
}
.screen-body-item {
flex: 1;
padding: 50px;
}
.screen-body-item.left {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.app-title {
display: flex;
/
flex-direction: column;/
justify-content: center;
align-items: center;
color: #33d9b2;f;
font-size: 26px;
text-transform: uppercase;
border-left: 4px solid #218c74;
padding: 10px;
}
.app-form-group {
margin-bottom: 15px;
}
.app-form-group.buttons {
margin-bottom: 0;
text-align: right;
}
.app-form-control {
width: 100%;
padding: 10px 0;
background: none;
border: none;
border-bottom: 1px solid #666;
color: #ddd;
font-size: 14px;
text-transform: uppercase;
outline: none;
transition: border-color .2s;
}
.app-form-control:
laceholder {
color: #FFF;
}
.app-form-control:focus {
border-bottom-color: #ddd;
}
.app-form-button {
background: none;
border: none;
color: #33d9b2;
font-size: 14px;
cursor: pointer;
outline: none;
text-transform: uppercase;
}
.app-form-button:hover {
color: #218c74;
}
.showdata{
text-align: center;
color: white;
font-size: 1.2rem;
padding-top: -10px;
padding-bottom: 10px;
}
</style>
</head>
<body>
<div class="background">
<div class="container">
<div class="screen">
<div class="screen-body">
<div class="screen-body-item left">
<div class="app-title">
<div class="animated infinite heartBeat">
Student <br> Grade <br>
</div>
</div>
</div>
<div class="screen-body-item">
<div class="app-form">
<div class="app-form-group">
<input type="text" class="app-form-control" placeholder="Activities" id="g">
</div>
<div class="app-form-group">
<input type="text" class="app-form-control" placeholder="exam" id="e">
</div>
<div class="app-form-group">
<input type="text" class="app-form-control" placeholder="recitation" id="r">
</div>
<div >
<input type="button" name="" value="Compute" class="app-form-button" onclick="getResult()">
</div>
<div >
<input type="reset" name="" value="reset" class="app-form-button">
</div>
</div>
</div>
<div class="app-form-group showdata">
<p id="result"></p>
</div>
</div>
<script>
function getResult()
{
g = document.getElementById("Activities").value;
e = document.getElementById("exam").value;
r = document.getElementById("recitation").value;
if(g>95 || g<65 || e>95 || e<65 || r>95 || r<65)
{
alert("Grade cannot be greater than 95 and less than 65")
}
else
{
g1 = 0.35*g
g2 = 0.40*e
g3 = 0.25*r
grade = g1+g2+g3
if(grade >=91 && grade <=95)
{
document.getElementById("result").innerHTML = "EXCELLENT";
}
else if(grade >=86 && grade <=90)
{
document.getElementById("result").innerHTML = "GOOD";
}
else if(grade >=80 && grade <=85)
{
document.getElementById("result").innerHTML = "FAIR";
}
else if(grade >75 && grade <=79)
{
document.getElementById("result").innerHTML = "POOR";
}
else if(grade <=74)
{
document.getElementById("result").innerHTML = "FAIL";
}
</script>
</body>
</html>[/CODE]