Iโll be honest.
When I first started learning Python, I looked at code and thought:
โOkay... but why does the computer understand this?โ ๐
There were variables, strings, integers, floats, booleans, input(), type(), f-strings...
It felt like learning a new language where everyone had forgotten to give me the dictionary.But after practicing the basics, something started to click.
Python isn't magic.
It's mostly about "telling the computer exactly what kind of information you're giving it and what you want it to do with that information."
So here are some of the things that finally started making sense to me.
๐งฑ 1. Variables Are Basically Little Boxes
Imagine I have a box labelled name.
I can put "Amina Wanjiku" inside it.
name = "Amina Wanjiku"
Another box called age:
age = 24
And another called city:
city = "Nairobi"
Now Python knows:
name โ Amina Wanjiku
age โ 24
city โ Nairobi
I can simply ask Python to show me what's inside:
print(name)
print(age)
print(city)
This was one of the first things that made programming feel less mysterious.
A variable is basically Python saying:
โGive this information a name so we can use it later.โ
๐ข 2. Not Every Number Is Actually a Number
This one caught my attention.
Look at these:
num_a = 7
num_b = "7"
They look almost identical.
But Python sees two completely different things.
print(num_a + num_a)
gives:
14
While:
print(num_b + num_b)
gives:
77
Wait... what? ๐
The reason is simple.
7 is an integer.
"7" is text.
So Python isn't adding 7 + 7.
It's joining:
"7" + "7"
which becomes:
"77"
That little difference taught me an important lesson:
Computers don't care what something looks like to us. They care what type of data it actually is.
๐๏ธ 3. Meet the Python Data Types
So far, I've met four of the basic ones:
str โ Text
name = "Nelly"
int โ Whole numbers
age = 22
float โ Decimal numbers
balance = 74670.50
bool โ True or False
is_student = True
has_id_card = False
And when I get confused about what something is, Python has my back:
print(type(age))
Python responds:
<class 'int'>
Basically, Python can tell me:
โNelly, that's an integer. Please stop trying to treat it like text.โ ๐
๐ฃ๏ธ 4. Then I Learned How to Make Python Ask Questions
This is where things became more interactive.
Before input(), my programs were basically me giving Python instructions.
Then I discovered:
name = input("What is your name? ")
Now Python waits for the user to answer.
If I enter:
Nelly
I can then do:
print("Hello", name)
And Python responds:
Hello Nelly
Suddenly, my program wasn't just sitting there displaying information.
It was having a conversation with me.
๐ฐ 5. My Accounting Brain Finally Got Involved
This is probably where I had the most fun.
I decided to create a simple money transfer calculation.
sender = input("Enter sender name: ")
recipient = input("Enter recipient name: ")
amount = int(input("Enter amount to send (Ksh): "))
charge = 11
total = amount + charge
print(f"Sending from {sender} to {recipient}")
print(f"Amount: Ksh {amount}")
print(f"Charge: Ksh {charge}")
print(f"Total: Ksh {total}")
If I enter:
Sender: Nelly
Recipient: Amina
Amount: 1000
Python can calculate:
Sending from Nelly to Amina
Amount: Ksh 1000
Charge: Ksh 11
Total: Ksh 1011
And suddenly I'm thinking:
Wait... I can actually use this for finance. ๐
That connection between my accounting background and Python is one of the things making learning programming exciting for me.
โจ 6. Then Came F-Strings
Before learning f-strings, I could write:
print("Name:", name, "Age:", age)
It works.
But then I learned:
print(f"Name: {name}, Age: {age}")
Much cleaner.
And Python can even calculate things inside the {}.
age = 22
print(f"Next year you will be {age + 1} years old")
Output:
Next year you will be 23 years old
So the {} isn't just for displaying a variable.
Python can actually do some work inside it.
๐๏ธ 7. From Tiny Concepts to an Actual Program
Then I combined everything I had learned and created a small ticket calculator.
The user enters:
Passenger name
Route
Fare
Booking fee
Python calculates the total and prints a formatted ticket.
passenger_name = input("Enter passenger name: ")
route = input("Enter route: ")
fare = int(input("Enter fare (Ksh): "))
booking_fee = int(input("Enter booking fee (Ksh): "))
total = fare + booking_fee
print("=" * 40)
print(" TICKET")
print("=" * 40)
print(f"Passenger name: {passenger_name}")
print(f"Route: {route}")
print(f"Fare: Ksh {fare}")
print(f"Booking fee: Ksh {booking_fee}")
print("-" * 40)
print(f"Total: Ksh {total}")
print("=" * 40)
print(" THANK YOU FOR BOOKING!")
print("=" * 40)
It's a tiny program.
But seeing those few lines turn into something interactive made the whole learning process feel different.
๐ง What I've Realised So Far
I'm learning that programming isn't about knowing everything.
It's about understanding a few concepts well enough to combine them.
Right now, my Python toolbox looks something like this:
๐ Strings โ Store text
๐ฆ Variables โ Store information
๐ข Integers โ Whole numbers
๐ฐ Floats โ Decimal numbers
โ
Booleans โ True / False
โจ๏ธ Input โ Get information from users
๐ Type casting โ Convert data types
๐งฎ Operators โ Perform calculations
โจ F-strings โ Make output cleaner
And these tiny building blocks can already create something useful.
That's probably my biggest takeaway so far:
You don't have to understand the whole programming world before you start building things.
Sometimes you just need to understand one little piece...
then another...
then another...
until suddenly the code that looked like random symbols starts telling a story.
And I'm just getting started. ๐๐ป
What's next?
I'm moving on to conditionals, loops, lists, dictionaries and functions.
Eventually, I want to take these Python skills into data analytics and financeโbusiness analyst, where numbers aren't just sitting in spreadsheets waiting to be formatted. ๐
For now, I'm learning in public, breaking things, fixing them and slowly figuring out what all these curly brackets and parentheses are trying to tell me.
One line of Python at a time.
Top comments (0)