Code Nexus
CurriculumHow we teachPricingBlogAboutContact
Start learning
  1. Curriculum
  2. /
  3. Season 2
  4. /
  5. Episode 3

Season 2: The Python Team · Episode 3 of 8

Someone Already Built It

You play: AI Engineering Trainee

Free
Start this episode free

Episodes run on a tablet or larger screen.

The situation

Code Nexus needs repeatable random sampling for a fairness audit and some system metadata for a bug report. 8-BIT proposes writing a random-number generator from scratch "for full control".

What you'll learn

  • PCAP 1.1-1.5: import forms, qualified names, module search path, `__name__` / `if __name__ == '__main__'`, selected `math` / `random` / `platform` calls, and building your own package.
  • The platform module (system, machine, python_version), dir() on a module and sys.path.

Who you work with

  • Maya Chen

    Senior AI Engineer · Your mentor

  • Kabelo Mokoena

    Platform and DevOps Engineer

Scenes

  1. 1.Don't reinvent random
  2. 2.Qualified names
  3. 3.Reproducible sampling
  4. 4.The package that won't import
  5. 5.The shadowed module
  6. 6.Modules and packages check

What you leave with

The fairness audit now samples reproducibly with a seeded `random.Random` instance, you can predict what each import form binds, and you found why `import random` was importing the wrong file.

Previous episode

The Program Crashed, Politely

Next episode

Emoji Are Not Always One Thing

Code Nexus

Practice first. Improvise less later.

We post practical tech tips and the odd 8-BIT opinion. Mostly the tips.

The CPD Group Approved Provider #791172

Learn

  • Curriculum
  • Pricing
  • Create account
  • Sign in

Support

  • Blog
  • Certification guides
  • About Code Nexus
  • How we teach
  • Human help

Legal

  • Terms and Conditions
  • Privacy Policy
  • Cookie Policy
  • Refund and Cancellation
  • Contact: contact@codenexus.co.za

© 2026 Code Nexus. All rights reserved.

Payments secured by Payfast · Billed in ZAR · South Africa