"""Create fallback_executor
Generated by Phi-Octopus Eden
2025-11-05 20:38:05.664812
"""

```python
from typing import Callable, Any


class FallbackExecutor:
    """
    A class for executing a function with fallback execution in case of errors.
    
    Attributes:
        main_func (Callable): The primary function to execute.
        fallback_func (Callable): The fallback function to use if the main function fails.
    """

    def __init__(self, main_func: Callable, fallback_func: Callable):
        self.main_func = main_func
        self.fallback_func = fallback_func

    def execute(self) -> Any:
        """
        Attempts to execute `main_func`. If an exception occurs during execution,
        `fallback_func` is executed instead. Returns the result of the successful function.
        
        Returns:
            The result of either `main_func` or `fallback_func`.
        """
        try:
            return self.main_func()
        except Exception as e:
            print(f"An error occurred: {e}")
            return self.fallback_func()


# Example usage
def divide_numbers(x: int, y: int) -> float:
    """Divides two numbers and returns the result."""
    return x / y

def safe_divide_numbers(x: int, y: int) -> float:
    """Safe version of `divide_numbers` that handles division by zero."""
    if y == 0:
        print("Cannot divide by zero. Returning zero.")
        return 0
    else:
        return x / y


# Create the FallbackExecutor instance with appropriate functions
executor = FallbackExecutor(main_func=divide_numbers, fallback_func=safe_divide_numbers)

# Execute and observe behavior on valid input
result1 = executor.execute(10, 2)  # Should be 5.0

# Execute and observe behavior on invalid input (division by zero)
result2 = executor.execute(10, 0)  # Should print "Cannot divide by zero. Returning zero." and return 0
```