People and students

Report a typo

Here's a class hierarchy with two classes:

class Person:
    def __init__(self, name, last_name, age=None):
        self.name = name
        self.last_name = last_name
        self.age = age
        print("Person created!")


class Student(Person):
    def __init__(self, name, last_name, group):
        super().__init__(name, last_name)
        self.group = group
        print("Student created!")

Suppose you want to create an instance of the class Student:

jack = Student("Jack", "Smith", "4153")

What will be the output of this code?

a)

# Student created!

b)

# Person created!

c)

# Student created!
# Person created!

d)

# Person created!
# Student created!

e)

# Jack Smith 4153
Select one option from the list
___

Create a free account to access the full topic