Question: class Student: def _ _ init _ _ ( self , firstname, lastname, major, year ) : self.firstname = firstname self.lastname = lastname self.major =
class Student:
def initself firstname, lastname, major, year:
self.firstname firstname
self.lastname lastname
self.major major
self.year year
def describeselfself:
return fselffirstnameselflastnameselfmajorselfyear
class StudentathleteStudent:
def describeselfself:
return fselffirstnameselflastnameselfmajorselfyear Athlete"
# Create an object Student that is an instance of the class Student
Student StudentHelen "Smith", "CIS", "Senior"
printStudentdescribeself
# Create an object Student that is an instance of the subclass Studentathlete
Student StudentathleteJohn "Smith", "CIS", "Senior"
printStudentdescribeself
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
