write a python program that accepts marks in subjects and display the percentage based on the percentage the program should be displays the grade as follows
percentage || Grade
• >=80 || A
• >=60 and <80 || B
• >=50 and <60 || C
• >=40 and < 50 || D
• <40 || E
Answers
Answered by
2
Answer:
Hey here is your code in python...
sum = 0
x = int(input('How many subjects? '))
m = int(input("Enter total max marks in each subject: "))
tm = x*m
for i in range(x):
a = int(input("Enter marks: "))
sum+=a
percentage = sum/tm
if percentage>=80:
print("You got A grade")
elif percentage>=60 and percentage<80:
print("You got B grade")
elif percentage>=50 and percentage<60:
print("You got C grade")
elif percentage>=40 and percentage<50:
print("You got D grade")
else:
print("You got E grade")
# HOPE THIS HELPS YOU
# Please mark this answer as brainliest
Similar questions
English,
4 months ago
Physics,
4 months ago
Chemistry,
9 months ago
Social Sciences,
9 months ago
Biology,
1 year ago