Created
August 25, 2022 06:27
-
-
Save codephillip/f4f4d4267469ee78ef4697e98b67da15 to your computer and use it in GitHub Desktop.
Revisions
-
codephillip created this gist
Aug 25, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ class School: def __init__(self, name, location): self.name = name self.location = location class Student: def __init__(self, name, age, school): self.name = name self.age = age self.school = school class Teacher: def __init__(self, name, qualification, school): self.name = name self.qualification = qualification self.school = school class Classroom: def __init__(self, classnumber, teacher): self.classnumber = classnumber self.teacher = teacher self.students = [] def add_student(self, student): self.students.append(student) def delete_student(self, name): for student in self.students: if student.name == name: self.students.remove(student)