Write a program that accepts marks of 5 subjects and find percentage and prints grades
Answers
Answered by
15
Here is your Answer:
This is a program in python that accepts marks of 5 subject and finds the grade
sub1=int(input("Enter marks of the first subject: "))
sub2=int(input("Enter marks of the second subject: "))
sub3=int(input("Enter marks of the third subject: "))
sub4=int(input("Enter marks of the fourth subject: "))
sub5=int(input("Enter marks of the fifth subject: "))
avg=(sub1+sub2+sub3+sub4+sub4)/5
if(avg>=90):
print("Grade: A")
elif(avg>=80&avg<90):
print("Grade: B")
elif(avg>=70&avg<80):
print("Grade: C")
elif(avg>=60&avg<70):
print("Grade: D")
else:
print("Grade: F")
Similar questions
Social Sciences,
6 months ago
Computer Science,
6 months ago
English,
6 months ago
Computer Science,
11 months ago