Answered step by step
Verified Expert Solution
Question
1 Approved Answer
need help running this program, copy pasted it on my progeam but it can't run 7 9. [10] Find the output printed by this program.
need help running this program, copy pasted it on my progeam but it can't run
7 9. [10] Find the output printed by this program. Pay attention to the output sequence and inheritance, class Student: def _init__(self, name, year=1): print("Call init in Student") self.name = name self.year - year def _str_(self): return "Student: {} of year: {}".Format(self.name, self.year) def printStudent(self): print(self._str_()) class FasilkomStudent(Student): def __init__(self, name, year, major): super() . _init_(name, year) print("Call init in FasilkomStudent") self.major = major def _str_(self): return "Fasilkom Student: {} of major: {}".format(self.name, self.major) def main(): s = Student("Garfield") s.printStudent) FasilkomStudent("Bamby",2,"CS") s.printStudent) print(isinstance(s, Student)) SE #output 1 #output 2 #output 3 #output 4 #output 5 if name main() --'_main__ Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started