Tuesday, March 3, 2026
print() to display output in Python.input() to collect information from the user and store it in a variable.Welcome back from a bit of a break! Today we’re using EduBlocks to write and run Python code right in your browser.
Step 1: Open EduBlocks in your browser.
Click “Python 3” to start a new Python project.
Step 2: Google search “how do I make hello world in Python?” and try out what you find. Type the code into EduBlocks and click Run.
You should see Hello, World! appear in the output area.
Step 3: Now Google search “how to ask for a name and print it in Python” and use what you find to extend your program. Your goal is a program that:
Try it out in EduBlocks and make sure it works.
Checkpoint: I have a working program that asks for my name and prints a personalized greeting.
After the warmup, Mr. Willingham will walk you through building a Madlibs game in Python. Madlibs is a classic word game where you ask someone for random words (nouns, verbs, adjectives, etc.) without telling them the story — then you plug their words into a pre-written story for a funny result.
This activity uses the same skills from your warmup — input(), variables, and print() — but combines them into a bigger, more creative program.
Your program should ask for at least 8 words from the user. Here are the required inputs:
| Prompt | Variable Name | Word Type |
|---|---|---|
| “Enter an adjective: " | adjective1 | Adjective (describes a noun) |
| “Enter a plural noun: " | plural_noun1 | Plural noun (more than one thing) |
| “Enter a verb: " | verb1 | Verb (action word) |
| “Enter a food: " | food | A type of food |
| “Enter a side dish: " | side | Any side dish |
| “Enter a verb ending in -ing: " | verb_ing | Verb with -ing (like “running”) |
| “Enter a number: " | number | Any number |
| “Enter an adjective: " | adjective2 | Another adjective |
Once all the inputs are collected, the program prints:
Today I went to a(n) {adjective1} school where the {plural_noun1}
were learning to {verb1}. For lunch, we ate {food} with a side
of {side} soup. After lunch, everyone started {verb_ing} for
{number} hours straight. The principal said it was the most
{adjective2} day in the history of the school!
Mr. Willingham will walk through this code with the class:
# Python Madlibs
# Step 1: Collect words from the user
adjective1 = input("Enter an adjective: ")
plural_noun1 = input("Enter a plural noun: ")
verb1 = input("Enter a verb: ")
food = input("Enter a food: ")
side = input("Enter a side dish: ")
verb_ing = input("Enter a verb ending in -ing: ")
number = input("Enter a number: ")
adjective2 = input("Enter an adjective: ")
# Step 2: Print the story with the user's words plugged in
print("")
print("=== YOUR MADLIBS STORY ===")
print("")
print("Today I went to a(n) " + adjective1 + " school where the " + plural_noun1)
print("were learning to " + verb1 + ". For lunch, we ate " + food + " with a side")
print("of " + side + " soup. After lunch, everyone started " + verb_ing + " for")
print(number + " hours straight. The principal said it was the most")
print(adjective2 + " day in the history of the school!")
After we build the base version together, try these:
print("")? Format your story so it looks clean in the output.Copy and paste your final code into a the Discussion Post on CTLS. Then try out two of your classmates’ stories. Leave a simple comment like “Nice job” on your favorite two stories.
Learning Target: I can use input() to collect data from a user, store it in variables, and combine it with strings to produce dynamic output.
input() A Python function that pauses the program, shows a message, and waits for the user to type something. Whatever the user types is returned as a string.
String
A piece of text in Python. Strings are written inside quotation marks, like "hello" or "Enter a noun: ".
String Concatenation
Joining two or more strings together using the + operator. For example, "Hello, " + name combines the text with whatever is stored in the name variable.
Variable A named container that stores a value. The value can be text, a number, or other types of data. We’ve used variables before in Minecraft — this is the same idea in Python.
Today you learned how to use input() and variables together to build an interactive program. These are the same fundamental concepts you’ve been using in Minecraft — variables store data, and your program uses that data to do something. The difference is that now the user gets to decide what goes into the variables while the program is running.
Next class, we’ll keep building on these Python skills with more interactive programs.