Untitled

 avatar
unknown
plain_text
10 months ago
2.1 kB
12
Indexable
# birthday_game.py
import time
from colorama import Fore, Style, init

# Initialize colorama
init(autoreset=True)

def type_print(message, delay=0.05):
    """Print letters one by one like animation"""
    for char in message:
        print(char, end='', flush=True)
        time.sleep(delay)
    print()

# Step 1: Ask sister's name
sister_name = input(Fore.MAGENTA + "Enter your sister's name: " + Style.RESET_ALL)

# Step 2: Welcome message
type_print(Fore.CYAN + f"\nπŸŽ‰ Happy Birthday, {sister_name}! πŸŽ‰" + Style.RESET_ALL, 0.08)
type_print(Fore.YELLOW + "Let's play a little birthday surprise game! 🎈\n" + Style.RESET_ALL, 0.05)

# Step 3: Show options
type_print("Choose your surprise by entering a number:\n")
type_print("1. πŸŽ‚ Cake")
type_print("2. 🎁 Gift")
type_print("3. 🎈 Balloons")

choice = input(Fore.MAGENTA + "\nYour choice (1/2/3): " + Style.RESET_ALL)

# Step 4: Display based on choice
if choice == "1":
    cake = """
       ,,,,,,
      | HAPPY |
      | BIRTH |
      | DAY!! |
      `""""""`
        [|||]
        [|||]
        [|||]
    """
    type_print(Fore.RED + cake + Style.RESET_ALL)
    type_print(Fore.CYAN + "Yay! Here’s your virtual cake! 🍰" + Style.RESET_ALL)
elif choice == "2":
    gift = """
      _______
     /       \\
    |  🎁🎁  |
    |_______|
    """
    type_print(Fore.GREEN + gift + Style.RESET_ALL)
    type_print(Fore.CYAN + "Surprise! You got a virtual gift! 🎁" + Style.RESET_ALL)
elif choice == "3":
    balloons = """
       🎈 🎈 🎈
       🎈 🎈 🎈
       🎈 🎈 🎈
    """
    type_print(Fore.MAGENTA + balloons + Style.RESET_ALL)
    type_print(Fore.CYAN + "Look! Your balloons are flying! 🎈🎈" + Style.RESET_ALL)
else:
    type_print(Fore.RED + "Oops! Invalid choice, but still wishing you a wonderful day! πŸ’–" + Style.RESET_ALL)

# Step 5: Ending message
type_print(Fore.YELLOW + f"\nHope you enjoyed your surprises, {sister_name}! πŸ’•" + Style.RESET_ALL)
type_print(Fore.CYAN + "May your day be filled with happiness, love, and fun! πŸŽ‰" + Style.RESET_ALL)
Editor is loading...
Leave a Comment