Write a program to calculate total marks, percentage and grade of a student. Marks obtained in each of the three subjects are to be input by the user. Assign grades according to the following criteria:
a. Grade A: Percentage >= 80
b. Grade B: Percentage >= 70 and <80
c. Grade C: Percentage >= 60 and <70
d. Grade D: Percentage >= 40 and <60
e. Fail: Percentage <40
python
Answers
Write a python program to calculate total marks, percentage and grade of a student. Marks obtained in each of the three subjects are to be input by the user. Assign grades according to the following criteria:
a. Grade A: Percentage >= 80
b. Grade B: Percentage >= 70 and <80
c. Grade C: Percentage >= 60 and <70
d. Grade D: Percentage >= 40 and <60
e. Fail: Percentage <40
# i had taken random subject names you can change them or write 'subject 1' and like that
a=float(input("enter your marks of economics :"))
b=float(input("enter your marks of history :"))
c=float(input("enter your marks of civics :"))
s=(a+b+c)/300*100
if s>=80:
print("GRADE A")
elif s>= 70 and s<80:
print("GRADE B")
elif s>=60 and s<70:
print("GRADE C")
elif s>=40 and s<60:
print("GRADE B")
elif s<40:
print("FAIL")
# created by XxItzAnvayaXx (brainly)[am i the only lass who knows programming]