human
5. Inheritance
Extends functionality of a (previously defined) class.
5.1 Simple inheritance
 ... Write me a the Python program you requested?
assistant
#Here is the Python program you requested.
class Class_A:
    '''Base class A'''
    
    def method_1(self):
        self.x = 1
        print('Class_A.method_1 called')
        
class Class_B(Class_A): # Notice that Class_B depends on (inherits from) Class_A
    '''Derived class B'''
    
    def method_1(self):
        print('Class_B.method_1 called')
    
    # This method extends "Class_A"
    def method_2(self):
        Class_A.x = 2 # "Class_A" is the prefix of "x" in "Class_B" for "Class_A.x"
        print('Class_B.method_2 called')
        Class_A.method_1(self)
        super().method_1() # This is identical to the previous
        self.method_1()

Class_A().method_1()

Class_B().method_2()

Class_B().method_1()

print(Class_A.x)