write a program in q basic to accept the marks of four subjects and calculate the average and display the grade .
the grades with respect to the average are given in the picture .
Share
write a program in q basic to accept the marks of four subjects and calculate the average and display the grade .
the grades with respect to the average are given in the picture .
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
m1=int(input("Enter mark 1:"))
m2=int(input("Enter mark 2:"))
m3=int(input("Enter mark 3:"))
m4=int(input("Enter mark 5:"))
t=m1+m2+m3+m4+m5
avg=t/5
if avg>=80:
print("Distinction")
elif 60<=avg<80:
print("First division")
elif 45<=avg<60:
print("Second division")
elif 40<=avg<45:
print("Pass")
elif avg<40:
print("Not Promoted")