The function RunProgram() performs the preparations, turning LEDs on / off, and so on and particularly invoking the function: ExecuteTask(). The latter is the perform that accommodates the execution’s logic of the sequence of steps. The function will increase the…