'''
Assignment No: 4
To accept students five courses marks and compute his/her result.
Student is passing if he/she scores marks equal to and above 40 in each course.
If student scores aggregate greater than 75%, then the grade is distinction.
If aggregate is 60>= and <75 then the grade if first division.
If aggregate is 50>= and <60, then the grade is second division.
If aggregate is 40>= and <50, then the grade is third division.
'''
class Student: # creation of class
def __init__(self): # __init__() function to assign values to object properties
self.marks = []
self.passed = True
def input(self): # input function is defined using the def keyword.
#Self parameter is a reference to the current instance of the class, and is used to access variables that belong to the class.
try:
for i in range(5):
mark = float(input("Marks: "))
self.marks.append(mark)
if mark < 40:
self.passed = False
except:
print("Enter marks in digits.")
def grade(self): #grade function is defined
if self.passed:
average = sum(self.marks)/5
if average>75:
print("Distinction")
elif average >= 60 and 75> average:
print("First Division")
elif average >= 50 and 60> average:
print("Second Division")
else:
print("Third Division")
else:
print("Failed")
if __name__ == '__main__':
student = Student()
student.input() # function calling
student.grade()
Assignment No: 4
To accept students five courses marks and compute his/her result.
Student is passing if he/she scores marks equal to and above 40 in each course.
If student scores aggregate greater than 75%, then the grade is distinction.
If aggregate is 60>= and <75 then the grade if first division.
If aggregate is 50>= and <60, then the grade is second division.
If aggregate is 40>= and <50, then the grade is third division.
'''
class Student: # creation of class
def __init__(self): # __init__() function to assign values to object properties
self.marks = []
self.passed = True
def input(self): # input function is defined using the def keyword.
#Self parameter is a reference to the current instance of the class, and is used to access variables that belong to the class.
try:
for i in range(5):
mark = float(input("Marks: "))
self.marks.append(mark)
if mark < 40:
self.passed = False
except:
print("Enter marks in digits.")
def grade(self): #grade function is defined
if self.passed:
average = sum(self.marks)/5
if average>75:
print("Distinction")
elif average >= 60 and 75> average:
print("First Division")
elif average >= 50 and 60> average:
print("Second Division")
else:
print("Third Division")
else:
print("Failed")
if __name__ == '__main__':
student = Student()
student.input() # function calling
student.grade()
👍
ReplyDeleteEasy pratical
ReplyDeleteVery nice it is
ReplyDeleteVery nice it is
ReplyDeleteStudent result calculation practical is easy to understand.
ReplyDelete👍😊👍
Nice practical
ReplyDeleteUnderstanding
ReplyDeleteIt is easy to understand..
ReplyDeleteIts easy to understand.
ReplyDeleteIts easy to understand.
ReplyDeleteIts easy to understand.
ReplyDeleteLittle beat not hard
ReplyDeleteError occurred while running the problem... Little bit hard
ReplyDeleteError is fount in this practical lot of times
ReplyDelete👍
ReplyDelete
ReplyDeleteEasy concept... Understandable
Very nice program and easy to understand
ReplyDeleteLittle bit hard
ReplyDelete👍
ReplyDeleteEasy
ReplyDeleteEasy to understand
ReplyDeleteLittle bit hard but understood
ReplyDeleteWhile running program lots of error occurred but finally done with it 👍
ReplyDeleteNice program
ReplyDeleteEasy to learn
ReplyDeleteLittle bit confusing... But easy when we understand to correct the errors
ReplyDeleteEasy and better understanding
ReplyDelete🔌💻🖥️🖱️⌨️🖨️💿📀 THIS PROGRAMME IS EXCELLENT
ReplyDeleteKadakkkkkkkk
ReplyDeleteStudent Result Calculation it displays the marks with class medium..✌️😎
ReplyDeleteI calculated my last exam marks by this program
ReplyDeleteEasy to understand
ReplyDeleteEasy
ReplyDeleteEasy program
ReplyDeletethank sir
ReplyDelete👍👍
ReplyDeleteEasy to understand....
ReplyDelete👍
ReplyDeleteGood Post. I like your blog. Thanks for Sharing.
ReplyDeletePython Course in Noida
Understandable
ReplyDeleteUnderstand
ReplyDelete
ReplyDeleteVery nice post with lots of information. Thanks for sharing this
Python Online Training in Hyderabad
Python Training in Hyderabad
Python Training
Python Online Training
Easy to understand
ReplyDelete👍
ReplyDeleteUnderstandable
ReplyDeleteUnderstood
ReplyDeleteEasy to understand
ReplyDeleteUnderstood
ReplyDeleteUnderstood this program
ReplyDeleteUnderstood this program
ReplyDeleteEasy to understand
ReplyDeleteEasy to understand.
ReplyDelete👍👍
ReplyDelete👍👍
ReplyDeleteEasy program
ReplyDeleteEasy program
ReplyDeleteGreat post.
ReplyDeletehttps://www.turnkeylinux.org/user/1213275
Easy to understand
ReplyDelete👍👍
ReplyDeleteEasy to understand
ReplyDeleteEasy to understand
ReplyDeleteEasy to understand and so much helpful
ReplyDeleteplease, explain this program step by step.
ReplyDeleteonline training in python
ReplyDeleteonline training on python
Understand sir
ReplyDeleteC-17
ReplyDeleteUnderstand sir
puku lodhi
ReplyDeleteA1-roll no-02
ReplyDeletegood
This comment has been removed by the author.
ReplyDeleteBatch-A1
ReplyDeleteRoll no-05
thank you
Roll No = 09
ReplyDeletebatch no = A1
Batch-A1
ReplyDeleteRoll no-13
Thank you
Thanks for sharing such a Excellent Blog! We are linking too this particularly great post on our site. Keep up the great writing.
ReplyDeletepython assignment help