"""Create fact_checker
Generated by Phi-Octopus Eden
2025-11-08 05:31:20.492087
"""

```python
from typing import List, Dict


class FactChecker:
    """
    A basic fact-checking system that verifies if a statement is true or false based on predefined facts.
    
    Args:
        known_facts: A dictionary containing key-value pairs where the key is the fact to be checked and the value 
                     is its boolean truthiness (True for true, False for false).
    """

    def __init__(self, known_facts: Dict[str, bool]):
        self.known_facts = known_facts

    def check_fact(self, statement: str) -> bool:
        """
        Check if the given statement matches a predefined fact.

        Args:
            statement: The statement to be checked against the known facts.
        
        Returns:
            A boolean value indicating whether the statement is true or false based on the known facts.
        
        Raises:
            KeyError: If the statement does not match any known fact.
        """
        if statement in self.known_facts:
            return self.known_facts[statement]
        else:
            raise KeyError(f"Unknown fact: {statement}")

    def add_fact(self, new_fact: str, truthiness: bool) -> None:
        """
        Add a new fact to the known facts dictionary.

        Args:
            new_fact: The new fact to be added.
            truthiness: The boolean value indicating the truthiness of the new fact (True or False).
        """
        self.known_facts[new_fact] = truthiness


# Example usage
if __name__ == "__main__":
    # Define some known facts
    known_facts = {
        "The Earth is round": True,
        "2 + 2 equals 4": True,
        "Python is a programming language": True,
        "Water boils at 100 degrees Celsius": True,
    }

    # Create a fact checker with the predefined facts
    fact_checker = FactChecker(known_facts)

    # Check some statements
    try:
        print(f"Is 'The Earth is flat'? {fact_checker.check_fact('The Earth is flat')}")
        print(f"Is '2 + 2 equals 5'? {fact_checker.check_fact('2 + 2 equals 5')}")
        print(f"Is 'Python is a snake' based on the known facts? {fact_checker.check_fact('Python is a snake')}")

        # Add a new fact
        fact_checker.add_fact("AI can learn from data", True)

        # Check again after adding a new fact
        print(f"After adding, is 'AI can learn from data'? {fact_checker.check_fact('AI can learn from data')}")
    except KeyError as e:
        print(e)
```