class Student:
    insti = "IITM"

    def __init__(self, rollno, hostel, facad):
        print("inside Student.__init__ constructor")
        self.rollno = rollno
        self.hostel = hostel
        self.facad  = facad

    def getHostel(self):
        return self.hostel

    def changeHostel(this, newhostel):
        this.hostel = newhostel

    def __str__(self):
        return f'''<h1>{self.rollno}</h1>
                  I am a student of {self.insti}.<br>
                  I stay in the brand new hostel <i>{self.hostel}</i>.<br>
                  My faculty advisor is {self.facad}.<p>
               '''
class GodavariStudent(Student):
    def __init__(self, rollno, facad):
        print("inside GodavariStudent.__init__ constructor")
        #Student.__init__(self, rollno, "Godavari", facad)
        super().__init__(rollno, "Godavari", facad) # not passing self

    def enjoyMonkeys(self):
        print("This method enjoyMonkeys is specific to the child class GodavariStudent")

kavish = Student("CS25B061", "Mandakini", "KC")
print(kavish.getHostel())
print(kavish)   # can print an object, calls __str__ method

kavish.changeHostel("Kaveri")
print(kavish.getHostel())


prince = GodavariStudent("CS22B011", "RN")  # not passing hostel
print(prince)

prince.enjoyMonkeys()
#kavish.enjoyMonkeys()      # results in an error
