Version: 19 Last updated: 09:26:22 [CST] on 2026-03-12
Gemini seems to have more problems with Python than it does with Go, but here goes:

White Belt: The Foundations (1-12)

Focus: Syntax, variables, and basic input/output.
  1. The Greeting: Print "Hello, World" using a variable and an f-string.
  2. The Swapper: Swap two variables a and b without using a third variable.
  3. Basic Math: Write a script that takes two numbers and prints the sum, difference, and product.
  4. The Quotient: Use floor division // and modulo % to find the result and remainder of 17/3.
  5. Type Checker: Create a list of different types (int, float, string, bool) and print the type of each.
  6. The Lengthy String: Take a user's input and print how many characters it contains.
  7. Slicer: Take a string and print only the first 5 and last 5 characters.
  8. Reverser: Use slicing [::-1] to reverse a string.
  9. Case Sensitive: Convert a string to all uppercase, then all lowercase.
  10. The Stripper: Remove all whitespace from the beginning and end of a string.
  11. Circle Area: Calculate the area of a circle A=PIr2 using the math module.
  12. Integer Conversion: Convert a float string "98.6" into an actual integer (requires two steps).

Yellow Belt: Control Flow & Logic (13-25)

Focus: Conditionals, loops, and basic logic.
    Odd or Even: Take a number and print whether it is odd or even.

    The Gatekeeper: Check if a user is over 18 and has a "Gold" membership status.

    FizzBuzz: Print numbers 1-50, but "Fizz" for multiples of 3 and "Buzz" for multiples of 5.

    Leap Year: Write a script to determine if a year is a leap year.

    Simple Loop: Use a for loop to print every number from 1 to 100 that is divisible by 7.

    The Breakout: Use a while True loop that only breaks when the user types "exit".

    List Sum: Use a loop to sum all numbers in a list without using the sum() function.

    Vowel Counter: Count the number of vowels in a given sentence.

    Factorial: Calculate the factorial of a number using a while loop.

    The Guessing Game: Generate a random number (1-10) and let the user guess until they get it.

    Prime Check: Write a script to check if a number is prime.

    Multiplication Table: Generate a 10x10 multiplication table using nested loops.

    The Filter: Create a new list containing only the positive numbers from a mixed list.

Orange Belt: Data Mastery (26-38)

Focus: Lists, Dictionaries, Sets, and Tuples.

    List Comprehension: Create a list of squares for numbers 1–20 in one line.

    The Unique List: Remove duplicates from a list using a set.

    Dict Basics: Create a dictionary of 5 countries and their capitals.

    The Safe Access: Use .get() to access a dictionary key that might not exist.

    Dictionary Merge: Merge two dictionaries using the | operator.

    Inverter: Swap keys and values in a dictionary.

    Tuple Unpacking: Create a tuple of 3 items and unpack them into 3 variables.

    Set Intersection: Find the common elements between two lists using sets.

    Frequency Map: Create a dictionary that counts the frequency of each character in a string.

    Nested Access: Extract a value from a 3-level deep nested dictionary.

    The Sorter: Sort a list of dictionaries by a specific key value.

    Matrix Transpose: Turn rows into columns in a 2D list.

    The Queue: Use collections.deque to implement a basic First-In-First-Out (FIFO) queue.

Green Belt: Functions & Modules (39-52)

Focus: Clean code, scoping, and reusability.

    Basic Function: Write a function that converts Celsius to Fahrenheit.

    Default Params: Create a function that greets a user, defaulting to "Guest" if no name is given.

    Variable Args: Write a function *args that sums an unknown number of integers.

    Keyword Args: Write a function **kwargs that prints all passed key-value pairs.

    Docstrings: Write a function and document it using PEP 257 standards.

    Lambda Power: Use a lambda function to sort a list of tuples by their second element.

    Map & Filter: Use map() to double a list and filter() to remove odd numbers.

    Recursion: Write a recursive function to calculate the Fibonacci sequence.

    Local vs Global: Write a script that demonstrates variable shadowing.

    The Wrapper: Create a function that returns another function (a basic closure).

    Error Handling: Write a function that divides two numbers but catches ZeroDivisionError.

    Custom Exceptions: Define and raise your own InsufficientFundsError.

    Imports: Create two files; import a function from one into the other.

    The __name__ Check: Use if __name__ == "__main__": to prevent code execution on import.

Blue Belt: The Pythonic Way (53-66)

Focus: Intermediate patterns, decorators, and generators.

    Generators: Use yield to create a generator that produces infinite even numbers.

    The Timer Decorator: Write a decorator @timer that prints how long a function takes to run.

    Context Manager: Use the with statement to open and read a file safely.

    Custom Context Manager: Create a class with __enter__ and __exit__ methods.

    The Walrus: Use the := operator inside a list comprehension or while loop.

    Itertools: Use itertools.cycle to cycle through a list three times.

    Enumerate: Iterate through a list and print "Index X: Value Y" without using a counter variable.

    Zip: Combine two lists into a dictionary using the zip() function.

    Any/All: Use any() and all() to check conditions on a list of booleans.

    Property Decorator: Use @property to create a read-only attribute in a class.

    Static & Class Methods: Demonstrate the difference between @staticmethod and @classmethod.

    Collections.Counter: Find the top 3 most common words in a text file.

    Functional Reduce: Use functools.reduce to find the product of all numbers in a list.

    Structural Pattern Matching: Use the match and case syntax for a CLI command parser.

Purple Belt: OOP & Architecture (67-80)

Focus: Classes, inheritance, and design patterns.

    Basic Class: Create a Car class with make, model, and a drive() method.

    Inheritance: Create an ElectricCar that inherits from Car but overrides drive().

    Super(): Use super() to extend the parent’s __init__ method.

    Encapsulation: Use a "private" attribute (e.g., _balance) and a getter/setter.

    Dunder Str/Repr: Implement __str__ and __repr__ for a User class.

    Dunder Add: Implement __add__ so that adding two Point(x, y) objects works.

    Abstract Base Classes: Use the abc module to force subclasses to implement a method.

    Composition: Build a Computer class that is composed of CPU and RAM objects.

    Dataclasses: Refactor a simple data-holding class using the @dataclass decorator.

    Slots: Use __slots__ to restrict attribute creation and save memory.

    Multiple Inheritance: Create a class that inherits from two parents and explore the MRO.

    Mixin Pattern: Create a JsonSerializableMixin to add JSON functionality to any class.

    Singleton Pattern: Implement a class that can only ever have one instance.

    Factory Pattern: Create a ShapeFactory that returns different shape objects based on input.

Brown Belt: Systems & Integration (81-93)

Focus: Networking, Databases, and the OS.

    Pathlib: Use pathlib to find every .log file in a directory tree.

    JSON Storage: Write a script that saves a Python dictionary to a file and reads it back.

    CSV Processing: Parse a CSV file and calculate the average of one column.

    Requests: Fetch data from a public API and print the status code.

    SQLite Basics: Create a local database, a table, and insert three rows of data.

    SQL Alchemy: Use an ORM to query the same SQLite database.

    Threading: Run two functions in parallel using threading.Thread.

    Multiprocessing: Use a Pool to perform a CPU-heavy calculation on multiple cores.

    Asyncio Basics: Write an async function and run it using the event loop.

    Async Requests: Use aiohttp or httpx to fetch 5 URLs concurrently.

    Environment Variables: Use os.getenv and a .env file to manage secret keys.

    Subprocess: Call a system command (like ping) and capture the output.

    Logging: Set up a logger that writes "Info" to the console and "Error" to a file.

Black Belt: Senior Mastery (94-100)

Focus: Performance, production, and advanced engineering.

    Unit Testing: Write a test suite for a math library using pytest.

    Benchmarking: Use timeit to compare the speed of a list comprehension vs. a generator.

    Profiling: Use cProfile to identify a bottleneck in a slow function.

    FastAPI/Flask: Build a REST API with a single endpoint that returns JSON from a database.

    Pydantic: Define a data model with strict validation for an API request.

    Image Processing: Use the Pillow or OpenCV library to resize an image and apply a grayscale filter.

    The Grand Project: Build a concurrent web crawler that follows links, extracts titles, and saves them to a database with a timestamp.