When you are giving the child class a parent to inherit from, in this case; Parent, it literally inherits everything Parent has; it's attributes, methods, more. In this case you are REASSIGNING attribute which is already defined since you grabbed it from Parent. Therefore you would need to do attribute2 = attribute / 2 or attribute /= 2.