The replace_elem program is an illustration of functions, whose execution is carried out when the function name is evoked or called.
The program written in Python, where comments are used to explain each action is as follows:
#This defines the function
def replace_elem(myList, a, b):
#This iterates through the list elements
for i in range(0,len(myList)):
#The following if condition replaces the element
if(myList[i] == a):
myList[i] = b
#This prints the new list elements
print(myList)
Read more about python programs at:
https://brainly.com/question/26497128