Computer Science, asked by rgs012070, 3 months ago

1.To find average and grade for given mark. python programming
output also​

Answers

Answered by itzcocogirl2825
6

User must enter 5 different values and store it in separate variables.

Then sum up all the five marks and divide by 5 to find the average of the marks.

If the average is greater than 90, “Grade: A” is printed.

If the average is in between 80 and 90, “Grade: B” is printed.

Answered by dikshaagarwal4442
0

Answer:

# Python code to find an average and grade of marks

s1 = input("Enter marks of first subject")

s2 = input("Enter marks of second subject")

s3 = input("Enter marks of third subject")

s4 = input("Enter marks of fourth subject")

s5 = input("Enter marks of fifth subject")

avg = (s1 + s2 + s3 + s4 +s5)/5

print("The average of marks is " )

print(avg)

if(avg>90):

print("Grade is A+")

elif(avg>80 && avg<=90):

print("Grade is A")

elif(avg>70 && avg<=80):

print("Grade is B+")

elif(avg>60 && avg<=70):

print("Grade is B")

elif(avg>50 && avg<=60):

print("Grade is C")

elif(avg>35 && avg<=50):

print("Grade is D")

else:

print("Grade is F")

To learn more about python, click on the link below:

https://brainly.in/question/16086632

To learn more about average, click on the link below:

https://brainly.in/question/210536

#SPJ2

Similar questions