Answer to Question #259959 in Python for python

Question #259959

Build a GPA calculator that inputs grades of 3 different subjects along with the credit hours

from the user and displays the user’s GPA. The input grades and their corresponding grading

points are given below.

Grade Points

A 4.0

A- 3.67

B+ 3.33

B 3.0

B- 2.67

C+ 2.33

C 2.0

C- 1.67

D+ 1.33

D 1.0

F 0


The formula is

GPA = (GP1 * CH1 + GP2 * CH2 + GP3 * CH3)/ (CH1 + CH2 + CH3)

Where GP1 is Points of Subject 1 and CH1 show credit hours of subject 1.


1
Expert's answer
2021-11-01T18:57:19-0400
GP1=int(input("Enter grade 1: "))
CH1=int(input("Enter credit hour for grade 1:"))
GP2=int(input("Enter grade 2: "))
CH2=int(input("Enter credit hour for grade 2:"))
GP3=int(input("Enter grade 3: "))
CH3=int(input("Enter credit hour for grade 3:"))


GPA = (GP1 * CH1 + GP2 * CH2 + GP3 * CH3)/ (CH1 + CH2 + CH3)
print(GPA)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog