I need help with this.

At the end of the semester, students often wish to know what grade they need
on the final exam to get an A in the course. Write a program that prompts for the user’s grades
on exam 1, exam 2, and the homework and from this determines the grade necessary on the final
to get an overall average in the course of 90.

Exam 1 & 2 are 25 % each. Homework = 15 % & final exam = 35 %.

ask grade exam a
ask grade exam b
ask homework
90 = (needed*0.35) - (a*0.25) - (b*0.25) - (homework*0.15)

Cheers and Happy coding

But how will I exactly put it? So far I have this:


a = input("Enter Grade for Exam 1 (25 %):")
b = input("Enter Grade for Exam 2 (25 %):")
c = input("Enter Grade for Homeworks (15 %):")
total = a + b + c
avg = total / 3.0
d = avg * .65


print "To make an A in the course, you need at least:",

Rethink formula you are dealing with weighted average. Also you need numbers from user input strings.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.