File size: 1,322 Bytes
8db3c4b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
def generate_fun_fact():
    """Generate random fun facts to keep users engaged"""
    fun_facts = [
        "Octopuses have three hearts! 💙",
        "Honey never spoils - archaeologists have found pots of honey in ancient Egyptian tombs that are over 3,000 years old and still perfectly good to eat.",
        "A group of flamingos is called a 'flamboyance'! �",
        "Bananas are berries, but strawberies aren't! �",
        "The shortest war in history lasted only 38 minutes! ⏱️"
    ]
    return random.choice(fun_facts)

def calculate_progress(attempts):
    """Calculate user's progress based on number of attempts"""
    if attempts < 5:
        return "🌱 Beginner - Keep going!",
    elif attempts < 10:
        return "🌿 Intermediate - You're getting the hang of this!",
    elif attempts < 15:
        return "🌳 Advanced - You're persistent!",
    else:
        return "🌟 Master - Your determination is inspiring!"

def create_encouragement(attempts, last_result):
    """Generate personalized encouragement based on user's journey"""
    encouragements = [
        f"Attempt #{attempts}: Every expert was once a beginner.",
        f"Attempt #{attempts}: The harder you work for something, the greater you'll feel when you achieve it.",
    ]
    return random.choice(encouragements)