I am having trouble getting my functions to work properly. the requirements for my web page are to create a webpage that allows the user to enter a class name, their “grade” and number of credits per class. Allow the user to enter up to 5 classes. You may allow the user to enter more classes if you wish. When determining GPA for a semester A’s are worth 4 points, B’s are worth 3 points, C’s are worth 2 points, D’s are worth 1 point, and F’s are worth 0 points. To determine your GPA for the semester multiply the number of credits for each class times your grade (0-4); this gives you your honor points for each class. Add up the honor points for each class and divide by the total number of credits. For example, a student that takes 2 classes and earns a 3 credit B ( 9 honor points – 3 * 3)and a 4 credit A (16 honor points – 4
The user will enter 0 through 4 for the grade, but the web page should mention what needs to be entered. Meaning, tell the user to enter 4 for an A, 3 for a B, 2 for a C, 1 for a D, and 0 for an F.
Have a button initiate an action that calculates and displays the students GPA for the semester.