Spaces:
Running
Running
Update index.html
Browse files- index.html +38 -19
index.html
CHANGED
|
@@ -1,19 +1,38 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<title>How GradeCalculator.college Works</title>
|
| 6 |
+
<style>
|
| 7 |
+
body { font-family: Arial, sans-serif; padding: 2rem; background: #f9f9f9; color: #333; }
|
| 8 |
+
pre { background: #eee; padding: 1rem; overflow-x: auto; border-radius: 5px; }
|
| 9 |
+
a { color: #0077cc; text-decoration: none; }
|
| 10 |
+
a:hover { text-decoration: underline; }
|
| 11 |
+
</style>
|
| 12 |
+
</head>
|
| 13 |
+
<body>
|
| 14 |
+
<h1>How GradeCalculator.college Works</h1>
|
| 15 |
+
<p>This site helps students calculate their final grades based on scores and weights.</p>
|
| 16 |
+
<h2>Simple Grade Calculator Demo</h2>
|
| 17 |
+
<pre>
|
| 18 |
+
<input id="score" type="number" placeholder="Score" />
|
| 19 |
+
<input id="weight" type="number" placeholder="Weight (%)" />
|
| 20 |
+
<button onclick="calculateGrade()">Calculate</button>
|
| 21 |
+
<div id="result"></div>
|
| 22 |
+
|
| 23 |
+
<script>
|
| 24 |
+
function calculateGrade() {
|
| 25 |
+
const score = parseFloat(document.getElementById('score').value);
|
| 26 |
+
const weight = parseFloat(document.getElementById('weight').value);
|
| 27 |
+
if(isNaN(score) || isNaN(weight)) {
|
| 28 |
+
alert('Please enter valid numbers');
|
| 29 |
+
return;
|
| 30 |
+
}
|
| 31 |
+
const weighted = (score * weight) / 100;
|
| 32 |
+
document.getElementById('result').textContent = 'Weighted Score: ' + weighted.toFixed(2);
|
| 33 |
+
}
|
| 34 |
+
</script>
|
| 35 |
+
</pre>
|
| 36 |
+
<p>Try the full calculator at <a href="https://gradecalculator.college" target="_blank" rel="noopener noreferrer">gradecalculator.college</a></p>
|
| 37 |
+
</body>
|
| 38 |
+
</html>
|