Skip to content

Commit

Permalink
Merge pull request #2126 from yakatyansh/addedstudents.py
Browse files Browse the repository at this point in the history
added students.py
  • Loading branch information
fineanmol committed Oct 3, 2022
2 parents 074bd96 + a1dc134 commit 59f5479
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions students.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

n=input("Name of the student 1: ")
M=input("Name of the student 2: ")
J=input("Name of the student 3: ")
K=input("Name of the student 4: ")
L=input("Name of the student 5: ")
class Student:
def __init__(self,n,a,**m):
self.name = n
self.age = a
self.mark = m

def display(self):
print("Name of the student is ", self.name)
print("Age is ", self.age)
print("Marks obtained ", self.mark)

s1=Student(n, 20, DSA=100, OOP=90, DBMS=80)
s2=Student(M, 20, DSA=80, OOP=67, DBMS=70)
s3=Student(J, 20, DSA=90, OOP=80, DBMS=70)
s4=Student(K, 20, DSA=80, OOP=70, DBMS=60)
s5=Student(L, 20, DSA=70, OOP=60, DBMS=50)

s1.display()
s2.display()
s3.display()
s4.display()
s5.display()

0 comments on commit 59f5479

Please sign in to comment.