Answer:
In Python
def getpointValue(subject):
if subject >= 75: point = 4; grade = 'A'
elif subject >= 60: point = 3; grade ='B'
elif point >= 50: point = 2; grade = 'C'
elif point >= 40: point = 1; grade = 'D'
else: point = 0; grade = 'F'
return point,grade
subjects= ["Accounting","Marketing","Economics","MIS"]
acct = int(input(subjects[0]+": "))
mkt = int(input(subjects[1]+": "))
eco = int(input(subjects[2]+": "))
mis = int(input(subjects[3]+": "))
acctgrade = getpointValue(acct)
print(subjects[0]+" Grade: "+str(acctgrade[1]))
mktgrade = getpointValue(mkt)
print(subjects[1]+" Grade: "+str(mktgrade[1]))
ecograde = getpointValue(eco)
print(subjects[2]+" Grade: "+str(ecograde[1]))
misgrade = getpointValue(mis)
print(subjects[3]+" Grade: "+str(misgrade[1]))
totalpoint = (acctgrade[0] + mktgrade[0] + ecograde[0] + misgrade[0]) * 3
gpa = totalpoint/12
print("GPA: "+str(gpa))
Explanation:
<em>The solution I provided uses a function to return the letter grade and the point of each subject</em>
<em>I've added the explanation as an attachment where I used comment to explain difficult lines</em>
<em />