
🐍 NEED TO KNOW THINGS ABOUT PYTHON 🐍
Python is a popular programming language used to create computer programs.
For example, you can use Python to create a program that asks for you name and then greets you,
name = input("What is your name? ")
print("Hello,", name + "!")
When you run this program and enter James as your name, it gives you the following output,
What is your name? James Hello, James!
🐍 NEED TO KNOW THINGS ABOUT PYTHON 🐍
Python was created by Guido van Rossum and first released in 1991
🐍 NEED TO KNOW THINGS ABOUT PYTHON 🐍
Python is a language that lets humans give clear, step-by-step instructions to a computer.
Let us say that you want to write a program on “HOW TO MAKE TEA?”
A beginner programmer would write up the following program,
print("Let's make a cup of tea!")
print("Step 1: Take a pan.")
print("Step 2: Pour one cup of water into the pan.")
print("Step 3: Add one teaspoon of tea leaves.")
print("Step 4: Add sugar to taste.")
print("Step 5: Boil the mixture for 2 minutes.")
print("Step 6: Add milk.")
print("Step 7: Boil for another 2 minutes.")
print("Step 8: Strain the tea into a cup.")
print("Step 9: Your tea is ready. Enjoy!")
Output
Let's make a cup of tea! Step 1: Take a pan. Step 2: Pour one cup of water into the pan. Step 3: Add one teaspoon of tea leaves. Step 4: Add sugar to taste. Step 5: Boil the mixture for 2 minutes. Step 6: Add milk. Step 7: Boil for another 2 minutes. Step 8: Strain the tea into a cup. Step 9: Your tea is ready. Enjoy!
🐍 NEED TO KNOW THINGS ABOUT PYTHON 🐍
However, an experienced programmer knows that a good program doesn’t just list steps.
A good programs
1. Asks questions,
2. Makes decisions based on the answers, and
3. Adapts its behavior.
This introduces beginners to the concepts of input, variables, conditions (if), and decision-making in a fun way.
print("☕️ Welcome to the Python Tea Assistant!")
print("Let's make your perfect cup of tea.\n")
cups = input("How many cups of tea would you like to make? ")
print()
print("Take a pan.")
print(f"Pour enough water for {cups} cup(s).")
boiling = input("Is the water boiling? (yes/no): ")
if boiling.lower() == "yes":
print("Great! Let's continue.\n")
else:
print("Please wait until the water boils.\n")
tea = input("Are the tea leaves fragrant or stale? ")
if tea.lower() == "fragrant":
print("Excellent! Your tea will have a rich aroma.\n")
else:
print("The tea may not taste as fresh, but let's continue.\n")
milk = input("How much milk would you like? (little/medium/more): ")
if milk.lower() == "little":
print("Adding a little milk.\n")
elif milk.lower() == "medium":
print("Adding a balanced amount of milk.\n")
else:
print("Adding plenty of milk for a creamy tea.\n")
sugar = input("Is your sugar crystal or cubed? ")
if sugar.lower() == "cubed":
print("Sugar cubes take a little longer to dissolve.")
print("Keeping the tea on the stove a bit longer.\n")
else:
print("Crystal sugar dissolves quickly.\n")
hot = input("Would you like your tea piping hot? (yes/no): ")
if hot.lower() == "yes":
print("Adding sugar while the tea is still on the stove.\n")
else:
print("Turning off the flame before adding sugar.\n")
flavour = input("Would you like ginger, cardamom, both, or neither? ")
if flavour.lower() == "ginger":
print("Adding fresh ginger.")
elif flavour.lower() == "cardamom":
print("Adding crushed cardamom.")
elif flavour.lower() == "both":
print("Adding ginger and cardamom.")
else:
print("Keeping the tea plain.")
print("\nBoiling everything together...")
print("Straining the tea into your cup...")
print("☕️ Your customized tea is ready. Enjoy!")
The output would be based on the user requirements. For example, my requirements are
1. I want to make 2 cups of tea
2. Yes to boiling water
3. I have fragrant tea leaves
4. I want a balanced amount of milk in my tea
5. I have cubed sugar
6. I want my tea to be piping hot
7. I want ginger in my tea
Based on my requirements, the following would be the output.
☕️ Welcome to the Python Tea Assistant! Let's make your perfect cup of tea. How many cups of tea would you like to make? > 2 Take a pan. Pour enough water for 2 cup(s). Is the water boiling? (yes/no) > yes Great! Let's continue. Are the tea leaves fragrant or stale? > fragrant Excellent! Your tea will have a rich aroma. How much milk would you like? (little/medium/more) > medium Adding a balanced amount of milk. Is your sugar crystal or cubed? > cubed Sugar cubes take a little longer to dissolve. Keeping the tea on the stove a bit longer. Would you like your tea piping hot? (yes/no) > yes Adding sugar while the tea is still on the stove. Would you like ginger, cardamom, both, or neither? > ginger Adding fresh ginger. Boiling everything together... Straining the tea into your cup... ☕️ Your customized tea is ready. Enjoy!
🐍 NEED TO KNOW THINGS ABOUT PYTHON 🐍
But here’s where Python gets really interesting…
A human tea maker can reason:
“Since the water is already boiling, and the tea leaves are fragrant, I’ll add them now.”
However, the program we wrote cannot actually reason. It simply checks each answer against the conditions we programmed.
In fact, we can make it much smarter. Imagine this version:
☕️ Welcome! You want: 2 cups. ✓ Water is boiling. → Proceed to add tea leaves. ✓ Tea leaves are fragrant. → Boil for only 2 minutes to preserve the aroma. ✓ Medium milk selected. → Add 100 ml of milk. ✓ Sugar cubes selected. → Since sugar cubes dissolve slowly, keep the flame on for another 30 seconds. ✓ User wants piping hot tea. → Add sugar before switching off the flame. ✓ Ginger selected. → Crush fresh ginger before adding it to release maximum flavor. Final Result: ✔️ 2 cups of hot ginger tea ✔️ Medium milk ✔️ Cubed sugar fully dissolved ✔️ Rich aroma ☕️ Enjoy your tea!
Notice how this version isn’t just asking questions. It is using the answers to make logical decisions.
This is exactly what programming is all about:
Input → Processing (Logic) → Output
Your inputs:
2 cups ↓ Water boiling? → Yes ↓ Tea leaves fragrant? → Yes ↓ Milk → Medium ↓ Sugar → Cubed ↓ Want piping hot? → Yes ↓ Flavor → Ginger
These become decisions inside the program, which then produce the final customized tea.
This is the same pattern used by applications like food delivery apps, online shopping sites, banking software, navigation systems, and even AI assistants.
They all collect information, apply logic, and generate an appropriate result.
A simple tea-making program is a relatable way to demonstrate the fundamental idea behind every computer program.
Remember – HUMAN BEINGS LOVE INTERACTION!
Make your programs as interactive as possible!!