Overview
Python is one of the most versatile programming languages in existence — it powers everything from simple automation scripts to machine learning models and cloud infrastructure tooling. This bootcamp covers the full spectrum: from your first variable to building web apps, scraping data from the web, and working with APIs.
This guide extracts the most important concepts from the 100-day journey and organises them into a logical progression. Each section builds on the last. The GitHub repository contains all the daily project files and exercises.
Prerequisites
Learning path
Core concepts
Variables, data types, and operators
Python is dynamically typed — you don't declare types explicitly. Understand the key built-in types and how operators work on them.
name = "Uri" # str
age = 28 # int
score = 95.5 # float
active = True # bool
# String formatting (f-strings are preferred)
print(f"Hello, {name}. You are {age} years old.")
# Type conversion
age_str = str(age) # int → str
pi = float("3.14") # str → float
Control flow — if / for / while
Python uses indentation to define code blocks. Master list comprehensions early — they are more Pythonic and faster than equivalent for loops.
# Conditional
if score >= 90:
print("A grade")
elif score >= 75:
print("B grade")
else:
print("Keep going")
# List comprehension (preferred over for loop)
squares = [x**2 for x in range(1, 11)]
# Loop with enumerate
fruits = ["apple", "banana", "cherry"]
for index, fruit in enumerate(fruits):
print(f"{index}: {fruit}")
Functions and scope
Write functions with default arguments, *args for variable positional arguments, and **kwargs for keyword arguments. Understand local vs global scope.
def greet(name, greeting="Hello"):
return f"{greeting}, {name}!"
# *args and **kwargs
def summarise(*args, **kwargs):
print(f"Positional: {args}")
print(f"Keyword: {kwargs}")
summarise(1, 2, 3, name="Uri", role="Engineer")
# Lambda (anonymous functions)
square = lambda x: x ** 2
doubled = list(map(lambda x: x * 2, [1, 2, 3]))
Object-Oriented Programming
Classes let you model real-world entities with attributes (data) and methods (behaviour). Inheritance allows one class to reuse and extend another.
class Animal:
def __init__(self, name, species):
self.name = name
self.species = species
def __repr__(self):
return f"{self.name} ({self.species})"
def speak(self):
raise NotImplementedError
class Dog(Animal):
def __init__(self, name):
super().__init__(name, species="Canis lupus familiaris")
def speak(self):
return f"{self.name} says: Woof!"
rex = Dog("Rex")
print(rex.speak())
Working with APIs
Use the requests library to consume REST APIs. Understand HTTP methods (GET, POST), status codes, and how to parse JSON responses.
import requests
# GET request
response = requests.get("https://api.open-meteo.com/v1/forecast",
params={"latitude": -1.286389, "longitude": 36.817223,
"current_weather": True})
if response.status_code == 200:
data = response.json()
temp = data["current_weather"]["temperature"]
print(f"Nairobi temperature: {temp}°C")
else:
print(f"Error: {response.status_code}")
Automation with Python
Python's standard library and third-party packages make it easy to automate file operations, schedule tasks, send emails, and interact with the operating system.
import os
import shutil
from pathlib import Path
# Organise files by extension
downloads = Path.home() / "Downloads"
for file in downloads.iterdir():
if file.is_file():
ext = file.suffix.lower().strip(".")
dest = downloads / ext
dest.mkdir(exist_ok=True)
shutil.move(str(file), str(dest / file.name))
print(f"Moved {file.name} → {ext}/")