Hello Python, Meet Colab 👋🏽
“Every journey begins with one line of code.”
Today, you’re running your first code as an analyst, yaaay! 🎉
We’re going through this in a simple, chill way, the most non-tech way possible.
Taking it slow, easy, and fun. No jargon, no panic.
☁️ Where Do I Place My Line of Code?
That’s always the first question, isn’t it?
You’ve got an idea, you’re ready to code, but… where exactly does the magic happen?
Well, code can live in many places, examples, text editors, IDEs, scripts, etc but in data science, our favourite playgrounds are notebooks.
Why? Because notebooks let you write code and explanations side by side. You can talk to your reader (or future self!) in one cell, and then make the computer do something in the next. That’s how data scientists think, in logic and language.
Each notebook has two main types of cells:
💬 Markdown cells- for your text, thoughts, or even bad jokes.
💻 Code cells- for your actual Python code.
Together, they make your work neat, clear, and surprisingly human.
This structure keeps your work neat and readable, like writing in a digital journal that just happens to execute code.
Today, we’re using Google Colab, the online notebook that lets you code straight from your browser.
You’ve probably heard people talk about “Colab notebooks” like they’re some magical space where code comes alive. And honestly? They are.
Colab is a cloud-based coding lab.
You open a new notebook, and boom, you’re coding in seconds.
No installations, no lag, just vibes and logic. Everything saves automatically to your Google Drive. That’s already a win.
🌟 Why Colab Deserves an Award
- Works directly on your browser, no downloads, no chaos.
- Comes pre-loaded with almost every Python library (yes, even the scary deep learning ones).
- Saves automatically to Google Drive, say goodbye to “lost progress”.
- Mixes code, text, and images beautifully, perfect for storytelling.
- And yes, it’s free, just Google “Colab” and hit New Notebook.
It honestly feels like writing code in your diary, only this time, your diary listens and executes your thoughts.
🐍 Why Python Feels Like Home
I know, I know, “Python? As in that slithery Nyoka?” 😂
But the name might just make sense. Python glides through complex ideas so smoothly, you barely notice you’re doing something technical.
After a few lines, you’ll see why Python is adored by data scientists, developers, and anyone who loves making machines do the heavy lifting.
It’s simple, friendly, and powerful. It can build apps, crunch numbers, or teach AI how to think, all without scaring you off.
Python almost reads like English, no extra brackets, no mystery symbols, just clean, readable logic.
⚡ Why I’m a Fan
- Simple- you can read it like a story.
- Versatile- works for data, AI, web, or that random automation idea at 2 a.m.
- Massive community- someone, somewhere, already solved your problem.
- Works perfectly with Colab- your match made in code heaven.
💻 My First Python Programs
Alright, now for the real fun.
Let’s write some beginner-friendly programs, small but mighty steps toward understanding how computers think.
Don’t worry about mastering everything in one go. Programming is like learning a new dance, one move at a time, then you flow. 💃🏽
a. Printing My Name
print("Jerono")🪶 Explanation:
Get Jeron_’s stories in your inbox
Join Medium for free to get updates from this writer.
print() simply tells Python to show what’s inside the brackets.
- It’s your way of saying, “Hey computer, display this!”
- My first “Hello World” moment, but with my name instead. Instant serotonin boost.
Here is the code on colab:
b. Displaying the Second Stanza of the Kenyan National Anthem
print("""
O God of all creation,
Bless this our land and nation,
Justice be our shield and defender,
May we dwell in unity,
Peace and liberty,
Plenty be found within our borders.
""")🪶 Explanation:
- The triple quotes (
""") allow for multi-line text. - Perfect for poems, songs, or when you’re feeling patriotic.
- Python will print it exactly as you typed it, neat and proud. 🇰🇪
Colab:
c. Summation of 64 + 32
print(64 + 32)🪶 Explanation:
- Python can handle basic arithmetic faster than your calculator app.
- Just type the numbers and the operation — it does the rest.
- Spoiler: it’s 96. (You didn’t need a computer for that, but it’s good practice. 😄)
Colab formart:
d. Asking the User for Their Phone Number
phone = input("Enter your phone number: ")
print("Your number is:", phone)🪶 Explanation:
- The
input()function lets the user talk back to the program. - Whatever they type is stored in a variable — here, it’s
phone. - Then we print it back, just to be polite. ☎️
This code allows you to input your phone number:
e. Converting Days into Seconds
days = int(input("Enter number of days: "))
seconds = days * 24 * 60 * 60
print(f"{days} days = {seconds} seconds")🪶 Explanation:
This one mixes maths and logic beautifully.
- Ask for the number of days.
- Convert to seconds (
24 hours × 60 minutes × 60 seconds). - Use an f-string to make the result look clean and readable.
And just like that, you’ve done arithmetic, logic, and formatting in one go.
Here is an output example:
f. Calculating the Volume of a Sphere
import math
r = float(input("Enter radius of the sphere: "))
volume = (4/3) * math.pi * (r ** 3)
print(f"The volume of the sphere is {volume:.2f}")🪶 Explanation:
- Here, we brought in a library —
math— because why reinvent π (pi)? - The formula
(4/3)πr³calculates the volume of a sphere. - We used
r ** 3for r cubed, and:.2fto keep things tidy with two decimal places. - Boom. You’ve officially written your first scientific formula in Python. 🔬
Here it the code on colab:
🌱 Lessons from the Day
Today reminded me that coding isn’t about typing; it’s about thinking clearly.
- Each line is a step toward learning how computers reason.
- Google Colab made the process feel less like a lecture and more like play.
- Python, on the other hand, reminded me that clarity is power,even in tech.
It’s one thing to learn syntax; it’s another to realise you can make the computer understand your thoughts.
🌞 What’s Next
Next, we’ll dive deeper into Python, exploring data types, variables, and control flow.
But for now, remember this: you don’t have to know everything.
Just understand the basics, keep practising, and have fun experimenting.
Find new questions. Try them out in Colab. Watch your confidence grow, one run at a time.
Happy coding, my dear one. 🌻
Until the next line of code…
#Python #GoogleColab #DataScience #CodingJourney #LearnToCode #StorytellingInTech #KenyanTech #WomenInTech #HelloWorld #CodeWithEase #TechMadeSimple #JJ2









