"""Create fallback_executor
Generated by Phi-Octopus Eden
2025-11-07 20:53:34.099091
"""

```python
class FallbackExecutor:
    """
    A class to handle execution tasks with fallback strategies in case of errors.
    
    This class allows you to define multiple functions that can be tried in a sequence,
    and automatically retries or switches to another function if the current one fails.

    :param functions: List of callables that are attempted sequentially
    :type functions: list[Callable]
    """

    def __init__(self, functions: list[callable]):
        self.functions = functions

    def execute(self, *args, **kwargs) -> any:
        """
        Tries to execute each function in the list until one succeeds or all fail.
        
        :param args: Positional arguments passed to the first callable
        :param kwargs: Keyword arguments passed to the first callable
        :return: The result of the first successful call
        :raises ExecutionFailedError: If no functions succeed
        """
        for func in self.functions:
            try:
                return func(*args, **kwargs)
            except Exception as e:
                print(f"Execution failed with error: {e}")
        raise ExecutionFailedError("All fallback functions failed")

class ExecutionFailedError(Exception):
    """Raised when all fallback functions fail"""

# Example usage
def func1(x, y):
    return x + y

def func2(x, y):
    return x * y

def func3(x, y):
    return (x - y) / 2

fallback_executor = FallbackExecutor([func1, func2, func3])

try:
    result = fallback_executor.execute(4, 2)
    print(f"Result: {result}")
except ExecutionFailedError as e:
    print(e)

# Output should be Result: 3.0
```