This repository has been archived by the owner on Jan 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
calculator.html
57 lines (53 loc) · 1.96 KB
/
calculator.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<div id="title-purpose">Calculate your GPA</div>
<div id="calculator">
<div id=spinner-container>
<h3 id=spinner-label>Number<br>of<br>Classes</h3>
<input id="spinner" name="value">
</div>
<form id="form-main-table" autocomplete="off">
<div id="table-container">
<table id="main-table" class="table-hover">
<tbody id="main-tbody">
</tbody>
</table>
</div>
<div id="previous-details">
<div id="previous-gpa">
<label>Previous GPA</label>
<input name="previous-gpa" value=4.0>
</div>
<div id="previous-credits">
<label>Previous Credits</label>
<input name="previous-credits" value=0>
</div>
</div>
<input id="input-submit" type="submit" name="Submit">
</form>
<h1 id="gpa" hidden="true"></h1>
</div>
<div id="secondary-content">
<div id="instructions">
<h2><b>Instructions</b></h2>
<ul>
<li>Please enter valid grade letters (A, A, B+, B, B-, C+, C, C-, D+, D, F) or valid numerics (0-100).</li>
<li>For previous GPA, enter a number on the scale of 0-4.</li>
<li>If you do not have a previous GPA or you want to calculate the GPA for 1 semester, you start off with a GPA of 4.0.</li>
<li>All calculations will be done in the algorithm steps once the submit button is pressed.
</ul>
</div>
<div id="algorithm-steps">
<h1><b>Algorithm Steps</b></h1>
<p>1. Convert grades into Wentworth's scale of 0-4.</p>
<ul id="step-1"></ul>
<p>2. Calculate the weighted grade for each class by multiplying the grade and its respective credits.
The previous GPA also has to be weighted.</p>
<ul id="step-2"></ul>
<p>3. Sum up all the weighted grades.</p>
<ul id="step-3"></ul>
<p>4. Sum up all the credits.</p>
<ul id="step-4"></ul>
<p>5. Divide the sum of the weighted grades by the sum of credits to get your weighted GPA. Round the GPA to two decimal
points</p>
<ul id="step-5"></ul>
</div>
</div>