Q. Write a program to input marks in 3 subjects; compute average and then calculate grade as per following guidelines:
| Grade | Remarks | Marks |
|---|---|---|
| A | (Level 4, above agency-normalized standards) | 80% and above |
| B | (Level 3, at agency-normalized standards) | 70-79% |
| C | (Level 2, below, but approaching agency-normalized standards) | 60-69% |
| D | (Level 1, well below agency-normalized standards) | 50-59% |
| E | (Level 1-, too below agency-normalized standards) | 40-49% |
| R | (Remedial standards) | 39% and below |
You can understand by Watching video :-
Answer =
mark1 = int (input ("Enter the mark for subject 1 :- "))
mark2 = int (input ("Enter the mark for subject 2 :- "))
mark3 = int (input ("Enter the mark for subject 3 :- "))
print ("Average marks is :- ", (mark1 + mark2 + mark3) / 3 )
per = ((mark1 + mark2 + mark3) / 300) * 100
print("Percentage :-",per)
if per >= 80 :
print ("Grade is 'A'")
elif per >= 70 and per <= 79 :
print ("Grade is 'B'")
elif per >= 60 and per <= 69 :
print ("Grade is 'C'")
elif per >= 50 and per <= 59 :
print ("Grade is 'D'")
elif per >= 40 and per <= 49 :
print ("Grade is 'E'")
elif per <= 39 :
print ("Grade is 'R'")
Output :-
Enter the mark for subject 1 :- 93
Enter the mark for subject 2 :- 96
Enter the mark for subject 3 :- 85
Average marks is :- 91.33333333333333
Percentage :- 91.33333333333333
Grade is 'A'
>>>
Wrong code many things are missing in this code
ReplyDeleteAll things are correct , tell me what are missing ?????????
DeleteBro we have to find the percentage not the average
ReplyDeleteik that u have calculated for percentage as well but the output is given according t the average marks
Plx rectify this, take this note positively, ik u are a great programmer! all the best
Please see program carefully I have written it .
Deleteinvalid syntax bro
ReplyDeleteat mark3
Please Check program carefully.
Deleteits all good guys :)
ReplyDeleteThank you : )
DeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )