"""
SelfAssessmentTool
Generated by Eden via recursive self-improvement
2025-11-02 08:07:31.856501
"""

class SelfAssessmentTool:
    def __init__(self):
        # Define the questions to ask the user
        self.questions = [
            "How do you rate your understanding of financial management?",
            "How confident are you in managing team dynamics?",
            "Do you have a clear vision for your business goals and strategies?",
            "How well do you handle stress and challenges in entrepreneurship?",
            "Can you effectively manage time and prioritize tasks?"
        ]
        
        # Define the scoring system
        self.score_weights = {
            1: 20,
            2: 40,
            3: 60,
            4: 80,
            5: 100
        }
        
    def ask_questions(self):
        # Dictionary to store user's responses
        user_responses = {}
        
        for question in self.questions:
            response = int(input(f"{question} (Rate from 1-5): "))
            if 1 <= response <= 5:
                user_responses[question] = response
            else:
                print("Please enter a number between 1 and 5.")
                return self.ask_questions()
        
        return user_responses
    
    def calculate_score(self, responses):
        total_score = 0
        for question, response in responses.items():
            score = self.score_weights[response]
            total_score += score
        
        # Normalize the score to a percentage
        max_possible_score = len(responses) * 100
        normalized_score = (total_score / max_possible_score) * 100
        return normalized_score
    
    def provide_feedback(self, score):
        if score >= 80:
            print("You are well-prepared and have a strong foundation in entrepreneurship.")
        elif score >= 60:
            print("You have some areas for improvement but overall you're on the right track.")
        else:
            print("There's room for growth in your entrepreneurial skills. Consider seeking additional training or mentorship.")

# Instantiate the tool
tool = SelfAssessmentTool()

# Ask questions and get responses
responses = tool.ask_questions()

# Calculate the score
score = tool.calculate_score(responses)

print(f"\nYour self-assessment score is: {score}%")
tool.provide_feedback(score)