# The following program calculates an overall grade in a course based on three equally weighted exams. Keeps putting out ~2

I have a zyBooks question that I'm stuck on.

The following program calculates an overall grade in a course based on three equally weighted exams.

then provides this code:

``````exam1_grade = float(input('Enter score on Exam 1 (out of 100):\n'))
exam2_grade = float(input('Enter score on Exam 2 (out of 100):\n'))
exam3_grade = float(input('Enter score on Exam 3 (out of 100):\n'))

``````

then these questions.

Calculates the overall grade for four equally weighted programming assignments, where each assignment is graded out of 50 points. Hint: First calculate the percentage for each assignment (e.g., score / 50), then calculate the overall grade percentage (be sure to multiply the result by 100).

Calculates the overall grade for four equally weighted programming assignments, where assignments 1 and 2 are graded out of 50 points and assignments 3 and 4 are graded out of 75 points.

Calculates the overall grade for a course with three equally weighted exams (graded out of 100) that account for 60% of the overall grade and four equally weighted programming assignments (graded out of 50) that account for 40% of the overall grade. Hint: The overall grade can be calculated as 0.6 * averageExamScore + 0.4 * averageProgScore.

I (believe) I've got the first two questions, but I'm stuck on the last one. Putting in input that should result in a score of 100, I get 2.7, so it's giving me a result that's way too low. Can anyone help me figure out what I'm doing wrong?

``````exam2_grade = float(input('Enter score on Exam 2 (out of 100):\n'))
exam3_grade = float(input('Enter score on Exam 3 (out of 100):\n'))

assignment1_grade = int(input('Enter score on Assignment 1 (out of 50):\n'))
assignment2_grade = int(input('Enter score on Assignment 2 (out of 50):\n'))
assignment3_grade = int(input('Enter score on Assignment 3 (out of 50):\n'))
assignment4_grade = int(input('Enter score on Assignment 4 (out of 50):\n'))

overall_avg = (((assignment1_prc + assignment2_prc + assignment3_prc + assignment4_prc) / 4) * 100)

assignment1_grade = int(input('Enter score on Assignment 1 (out of 50):\n'))
assignment2_grade = int(input('Enter score on Assignment 2 (out of 50):\n'))
assignment3_grade = int(input('Enter score on Assignment 3 (out of 75):\n'))
assignment4_grade = int(input('Enter score on Assignment 4 (out of 75):\n'))

overall_avg = (((assignment1_prc + assignment2_prc + assignment3_prc + assignment4_prc) / 4) * 100)

exam1_grade = int(input('Enter score on Exam 1 (out of 100):\n'))
exam2_grade = int(input('Enter score on Exam 2 (out of 100):\n'))
exam3_grade = int(input('Enter score on Exam 3 (out of 100):\n'))

assignment1_grade = int(input('Enter score on Assignment 1 (out of 50):\n'))
assignment2_grade = int(input('Enter score on Assignment 2 (out of 50):\n'))
assignment3_grade = int(input('Enter score on Assignment 3 (out of 50):\n'))
assignment4_grade = int(input('Enter score on Assignment 4 (out of 50):\n'))