Find the grade of marks in 5 subject of student coderinme

Find the grade of marks in 5 subject of student coderinme

Find the grade of marks in 5 subject of student
We all better know the range of divisions before we code for it.
First division: 60 and above 60 percent
Second Division: from 50 to 59
Third Division: from 40 to 49
Fail: less than 40 percent are considered to be fail.
Marks grade in 5 subject of student.

#!/usr/bin/env python
tmarks = 0
for i in range(1,6) :
temp = int(raw_input("Enter the Marks of student in Subject "+str(i)+": "))
if temp <= 100 and temp >= 0 :
tmarks += temp
else:
print "Incorrent mark entered for subject ",i
res = tmarks / 5.0
if res >= 60 :
print "Obtained First division with ",res,"%"
elif res >= 50 :
print "Obtained Second division with ",res,"%"
elif res >= 40 :
print "Obtained Third division with ",res,"%"
else:
print "Failed with ",res,"%"

For more programs on Python, visit our Python Coder Archives

Find the grade of marks in 5 subject of student coderinme

All rights reserved. No part of this Post may be copied, distributed, or transmitted in any form or by any means, without the prior written permission of the website admin, except in the case of brief quotations embodied in critical reviews and certain other noncommercial uses permitted by copyright law. For permission requests, write to the owner, addressed “Attention: Permissions Coordinator,” to the admin @coderinme

Leave a reply:

Your email address will not be published.