Week three of Programming Fundamentals at MUBS. A BBC group of Applied Computing students has already spent two evenings fighting curly braces in a language that demanded a class just to print a greeting. Confidence is low. One student asks, quietly, whether they chose the wrong programme.
I teach that cohort as a Teaching Assistant in Applied Computing and IT, and I lecture related labs at Nkumba. I also write Python for cybersecurity and machine learning consulting in Kampala. The honest answer I give them is not a slogan. It is a plan: start with Python, finish a small tool this week, then branch into networking scripts, log analysis, or data work when the course asks for it.
This article rewrites the usual “Python is easy” lecture into something you can run today. You will see why the language fits IT students in Uganda, walk through a worked log scanner you can finish in one sitting, and leave with a same-day practice routine that still helps when you sit Packet Tracer or a VAPT internship later.
What goes wrong in the first six weeks
Students rarely fail because loops are hard. They fail because the first programme asks them to manage syntax, tooling, and ideas at the same time. In Java, printing a line forces packages, classes, static methods, and a String array before any business logic appears. In C, you meet pointers and compilers before you meet problem solving.
Python keeps the first win short. The official tutorial walks beginners through input, strings, and control flow without a build system: see the Python 3 Tutorial from the Python Software Foundation. That matters in a lab where power cuts truncate sessions and half the class shares machines.
Here is the first programme I ask MUBS groups to type from memory:
name = input("Enter your username: ")
print(f"Welcome to the system, {name}!")Ten minutes later they have feedback. That feedback loop builds the confidence needed for dictionaries, files, and APIs. At Nkumba I still see the same pattern: students who survive the first month with readable code stay for the harder modules.

Why IT careers in Kampala keep pulling Python back in
IT work in Kampala is rarely one silo. A graduate might support a LAN one month, write a small inventory script the next, then help a finance client clean Excel exports. Python shows up across that mix:
System automation: pathlib, subprocess, and scheduled jobs on Linux servers.
Networking: parsing
showoutput, driving labs beside Packet Tracer, preparing for Netmiko later.Cybersecurity and VAPT: regex on auth logs, HTTP clients for authorized tests, small report helpers.
Data and ML consulting: pandas pipelines and scikit-learn baselines for client pilots.
That spread is why I still start students here, even when the syllabus also names Java or C. You are learning computational thinking in a language that stays useful on the job market around Nakawa, Ntinda, and the CBD.
Worked example: a failed-login scanner you can finish today
Scenario: a small NGO office in Kampala exports authentication log lines into a text file. Your internship supervisor wants a list of source IPs with more than three failed password attempts. No fancy SIEM yet. Just Python and a clear report.
Create a file named scan_failed_logins.py. Use pathlib for paths, as documented in the pathlib library reference, and the standard re and collections modules:
import re
from collections import Counter
from pathlib import Path
def scan_failed_logins(log_path: Path, threshold: int = 3):
"""Flag IP addresses that exceed failed-login threshold."""
if not log_path.exists():
print(f"[!] Log file not found: {log_path}")
return
pattern = re.compile(r"Failed password for .* from (\d+\.\d+\.\d+\.\d+)")
failed_ips = []
with log_path.open("r", encoding="utf-8", errors="ignore") as handle:
for line in handle:
match = pattern.search(line)
if match:
failed_ips.append(match.group(1))
counts = Counter(failed_ips)
print(f"[*] Total failed attempts: {len(failed_ips)}")
print("[!] Flagged addresses:")
for ip, count in sorted(counts.items(), key=lambda item: item[1], reverse=True):
if count >= threshold:
print(f" -> {ip}: {count} failed attempts")
if __name__ == "__main__":
scan_failed_logins(Path("sample_auth.log"), threshold=3)Make a tiny sample_auth.log with a few “Failed password … from 41.210.x.x” lines copied from a lab VM. Run the script. Read the output aloud. You just practised file I/O, regular expressions, aggregation, and a clear console report. That is the same skill stack used when consultants triage noisy logs before a full VAPT engagement.
Notice what you did not need: a framework, a virtualenv debate, or a class hierarchy. Those come later. First competence is a working tool.
How I sequence the first month for BBC groups
When I plan Applied Computing tutorials, I keep the order ruthless:
Days 1 to 3: variables, input, if/else, while, for. Only the REPL and one
.pyfile.Days 4 to 7: lists, dictionaries, sets. Build a contact book or a simple inventory.
Week 2: functions and pathlib. Move scripts into named functions with docstrings.
Week 3: files and CSV. Read a marks sheet, compute averages, write a clean report.
Week 4: one domain project. Security students get the log scanner. Networking students parse a saved Packet Tracer CLI dump. Data students start a mini pandas notebook.
That sequence mirrors how consulting work actually arrives: small, local, testable pieces. It also survives shared lab PCs at Nkumba where installs are limited and offline practice matters.
Python beside Java, C, and JavaScript
I do not tell students to ignore other languages. I tell them to sequence learning so early frustration does not kill the programme.
Python: lowest boilerplate, strongest day-one automation payoff.
Java: still common in enterprise backends; learn it after you can think in loops and structures.
C: essential for systems courses and memory concepts; introduce it when the module demands it, with clear labs.
JavaScript: necessary for web front ends; pair it with HTML/CSS rather than forcing it as the first programming language for every IT track.
In Kampala hiring conversations I sit in, recruiters for SOC, network support, and junior data roles often ask what you have automated. A GitHub gist with the log scanner beats a half-finished Java Swing project every time for those roles.
Same-day takeaway: a 90-minute practice block
Before you close the laptop tonight, run this block. Use a phone timer if the lab Wi-Fi is slow.
Install nothing fancy. Use the system Python if the lab already has it, or the installer from python.org downloads.
Type the greeting programme from memory. Do not copy-paste.
Create
sample_auth.logwith eight lines and at least two repeated attacker IPs.Implement the scanner. Change the threshold. Confirm the list changes.
Write five bullet notes in your lab book: what regex matched, what Counter did, and one line you would improve tomorrow.
If you finish early, open the data structures chapter in the official tutorial and rebuild the scanner using only a dictionary instead of Counter. Teaching yourself two solutions for one problem is how consulting habits form.
Where this leads next
Once the scanner feels boring, stretch in the direction of your career:
Networking track: parse
show ip interface brieftext and flag down interfaces. Pair with my VLAN beginner guide and Packet Tracer labs.Security track: read authorized findings notes and draft remediation language. See what VAPT is and why it matters.
Data track: move from CSV logs to a pandas pipeline in building your first data pipeline.
Python is still the best first language for IT students here because it respects limited lab time, maps onto real Kampala work, and leaves you with a tool you can show. Start tonight. Bring the script to class tomorrow. Ask better questions because you already broke something on purpose and fixed it.