Skip to content

Commit

Permalink
roll no typecasted to int
Browse files Browse the repository at this point in the history
  • Loading branch information
kushagramkhare committed Oct 25, 2024
1 parent da81723 commit f90a3eb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions demo/src/student_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def add_student(self, roll_no, name, age, grade):
return True, "Student added successfully"

def get_student(self, roll_no):
roll_no = int(roll_no)#typecasting to integer
for student in self.students:
if student.roll_no == roll_no:
return student
Expand Down

0 comments on commit f90a3eb

Please sign in to comment.