"""
SelfAssessmentTool
Generated by Eden via recursive self-improvement
2025-11-02 04:17:24.137441
"""

class SelfAssessmentTool:
    def __init__(self):
        # Define key factors relevant to entrepreneurial potential
        self.factors = {
            "LeadershipQualities": 0,
            "InnovationCapacity": 0,
            "FinancialManagement": 0,
            "RiskTolerance": 0,
            "WorkLifeBalance": 0
        }
    
    def assess(self, responses):
        """
        Assess the user's entrepreneurial potential based on their input.
        
        Parameters:
            - responses (dict): A dictionary of answers to specific questions related to each factor.

        Returns:
            - dict: A summary of the assessment with scores for each factor.
        """
        self.factors["LeadershipQualities"] = 0.2 * int(responses.get("leadership_questions", [0])[0])
        self.factors["InnovationCapacity"] = 0.15 * int(responses.get("innovation_questions", [0])[0])
        self.factors["FinancialManagement"] = 0.15 * int(responses.get("financial_questions", [0])[0])
        self.factors["RiskTolerance"] = 0.2 * int(responses.get("risk_questions", [0])[0])
        self.factors["WorkLifeBalance"] = 0.3 * int(responses.get("balance_questions", [0])[0])
        
        return self.factors

    def display_results(self, scores):
        """
        Display the results of the assessment in a user-friendly manner.
        
        Parameters:
            - scores (dict): The summary of the assessment with scores for each factor.
        """
        print("Self-Assessment Results:")
        total_score = sum(scores.values())
        for factor, score in scores.items():
            percentage = round((score / total_score) * 100, 2)
            print(f"{factor.capitalize()}: {percentage}%")
        
        overall_percentage = round((total_score / (len(self.factors) * max(self.factors.values()))) * 100, 2)
        print(f"Overall Entrepreneurial Potential: {overall_percentage}%")

# Example usage:
tool = SelfAssessmentTool()
responses = {
    "leadership_questions": [5],
    "innovation_questions": [4],
    "financial_questions": [3],
    "risk_questions": [2],
    "balance_questions": [1]
}
scores = tool.assess(responses)
tool.display_results(scores)