Spaces:
Sleeping
Sleeping
import streamlit as st | |
import math | |
# Define the story and the emojis | |
story = "Once upon a time in the magical land of Emojiville, a quirky dog πΆ, a mischievous cat π±, and an intelligent graph π lived in harmony..." | |
emojis = ["πΆ", "π±", "π"] | |
# Define tree dimensions | |
tree_height = 5 * 12 + 11 # Convert to inches (71 inches) | |
tree_base_radius = 24 # Assume a 24-inch radius at the base of the tree | |
tree_top_radius = 4 # Assume a 4-inch radius at the top of the tree | |
# Calculate the circumference of the tree at different heights | |
num_spiral_levels = 10 # Define the number of levels for the spiral | |
spiral_circumferences = [] | |
for level in range(num_spiral_levels): | |
#st.markdown() | |
height_ratio = level / (num_spiral_levels - 1) | |
st.markdown(height_ratio) | |
height = height_ratio * tree_height | |
st.markdown(height) | |
radius = tree_base_radius - height_ratio * (tree_base_radius - tree_top_radius) | |
st.markdown(radius) | |
circumference = 2 * math.pi * radius | |
st.markdown(circumference) | |
spiral_circumferences.append((height, circumference)) | |
st.markdown(spiral_circumferences) | |
# Decorate the tree with the story and emojis | |
story_index = 0 | |
emoji_index = 0 | |
story_decorations = [] | |
for height, circumference in spiral_circumferences: | |
num_chars = int(circumference) // 2 # Assume each decoration takes 2 inches of space | |
level_decorations = "" | |
for _ in range(num_chars): | |
if story_index < len(story): | |
level_decorations += story[story_index] | |
story_index += 1 | |
else: | |
level_decorations += emojis[emoji_index] | |
emoji_index = (emoji_index + 1) % len(emojis) | |
story_decorations.append((height, level_decorations)) | |
# Display the decorated tree | |
for height, decorations in story_decorations: | |
print(f"Height: {height:.2f} inches - Decorations: {decorations}") | |
st.markdown(""" | |
Introduction | |
a. Dog πΆ, Cat π±, and Graph π are three unlikely friends who share unique and hilarious adventures together. | |
b. Dog is a playful, energetic, and loyal creature named Barky McTailwag. | |
c. Cat is a curious, mischievous, and graceful feline named Whiskers Purrington. | |
d. Graph is an intelligent, resourceful, and animated data visualization named Chartly Plotsworth. | |
Backstory | |
a. Barky, Whiskers, and Chartly first met when they were brought together by a mysterious power to save their world from boredom. | |
b. The trio quickly bonded and started sharing exciting adventures, forming a deep and enduring friendship. | |
Adventure 1: The Great Pancake Heist π₯ | |
a. The friends discover a pancake recipe that will bring joy to the world. | |
b. The recipe is locked away in a hidden vault, and they must work together to retrieve it. | |
c. Barky uses his agility to bypass traps, Whiskers uses cunning to pick locks, and Chartly deciphers codes. | |
d. They successfully steal the recipe and share the pancakes with everyone, spreading happiness. | |
Adventure 2: The Emoji Parade π | |
a. The friends learn of an annual Emoji Parade that celebrates their world's most beloved characters. | |
b. They decide to join in and design their own parade float. | |
c. They each contribute their unique talents: Barky builds the float, Whiskers sews costumes, and Chartly plans the route. | |
d. Their float is a hit at the parade, making them local celebrities. | |
Adventure 3: The Mysterious Island ποΈ | |
a. The trio stumbles upon a treasure map leading to a secret island. | |
b. They embark on a daring journey by sea, overcoming storms, sea monsters, and pirate encounters. | |
c. Upon arriving, they find an ancient temple filled with priceless artifacts and knowledge. | |
d. They return home, sharing their newfound wisdom with their community. | |
Dramatic Peak: The Battle of Laughter π | |
a. A powerful sorcerer threatens to drain all laughter from the world. | |
b. Barky, Whiskers, and Chartly are summoned to stop him. | |
c. The trio must pass various trials and tribulations to reach the sorcerer's lair. | |
d. They use their combined humor and wit to defeat the sorcerer, restoring laughter to the world. | |
Adventure 4: The Time-Traveling Odyssey β | |
a. The friends discover a time machine that sends them on a wild journey through history. | |
b. They visit prehistoric times, ancient civilizations, and futuristic cities. | |
c. Barky, Whiskers, and Chartly learn from their experiences and gain a newfound appreciation for the present. | |
d. They return home, eager to share their tales with their friends and family. | |
Adventure 5: The Great Space Race π | |
a. The friends are recruited for a space mission to explore new planets. | |
b. They train rigorously and learn valuable skills, such as piloting a spaceship and conducting scientific experiments. | |
c. They discover a friendly alien civilization and establish a peaceful alliance. | |
d. The friends return to their world, sharing their experiences and knowledge. | |
Adventure 6: The Talent Show Extravaganza π | |
a. Barky, Whiskers, and Chartly decide to showcase their skills at a local talent show. | |
b. They brainstorm and practice a hilarious comedy skit | |
["πΆ", "π±", "π"] | |
""") |