Well, I came up with a Python idea that got my 6-year-old daughter pretty hooked. Mad Libs! It’s basically just a series of text prompts that feeds into a story. The f-string in Python was very intuitive for her to learn and she quickly was able to help me troubleshoot. It’s a great way for her to entertain herself by filling in her own story, reading it aloud, and laughing her butt off…
Here’s the script:
from datetime import datetime
a = input("Enter a name: ")
a1 = input(f"Is {a} a boy or girl: ")
a2 = "He" if a1 == "boy" else "She"
b = input("Enter an adjective: ")
c = input("Enter an animal (including Human): ")
d = input("Enter a food: ")
e = input("Enter a verb: ")
f = input("Enter another name: ")
g = input("Enter a place: ")
h = input("Enter another name: ")
i = input("Enter an action (past tense): ")
j = input("Enter an action (past tense): ")
k = input("Enter a food: ")
l = input("Enter an action (past tense): ")
m = input("Enter a noun: ")
non_particular = "an" if b[0].upper() in ["A", "E", "I", "O", "U"] else "a"
story = f" \
Once upon a time, there was {non_particular} {b} {c} named {a}. \
{a} loved to eat {d}. {a2} also liked to {e} \
with {f}, and watch TV. \
\
One day, {a} went to the {g} and found {h}. They {i} and {j}. \
They also ate {k} and {l} on the {m}. \
\
The End. \
\
"
print(story)
save_story = input("Save story? Y/N: ")
if save_story.upper() == "Y":
outF = open(f"""story_{datetime.now().strftime("%Y%m%d_%H%M%S")}.txt""", "w")
outF.write(story)
outF.close()
Here’s an example output:
Once upon a time, there was a cute tigee named Moofy. Moofy loved to eat ice cream. She also liked to fart with Nellie, and watch TV. One day, Moofy went to the the bed and found Daddy. They played piano and burped. They also ate pizza and slept on the remote control. The End.