A function that changes an object’s state belongs to the category of

inspector functions
mutator functions
auxiliary functions
manager functions

The correct answer is B. mutator functions.

A mutator function is a function that changes the state of an object. This is in contrast to an inspector function, which only reads the state of an object, and a manager function, which controls the flow of execution of a program.

For example, the following function is a mutator function:

def set_x(self, x):
self.x = x

This function changes the value of the x attribute of the object that it is called on.

The following function is an inspector function:

def get_x(self):
return self.x

This function returns the value of the x attribute of the object that it

41.5 48.3 47.8C117.2 448 288 448 288 448s170.8 0 213.4-11.5c23.5-6.3 42-24.2 48.3-47.8 11.4-42.9 11.4-132.3 11.4-132.3s0-89.4-11.4-132.3zm-317.5 213.5V175.2l142.7 81.2-142.7 81.2z"/> Subscribe on YouTube
is called on.

The following function is a manager function:

def run(self):
# Do some work

This function controls the flow of execution of the program. It calls other functions and determines when the program should end.

I hope this explanation is helpful!