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

Season 2: The Python Team · Episode 1 of 8

Stop Copying That Function

You play: AI Engineering Trainee

Free
Start this episode free

Episodes run on a tablet or larger screen.

The situation

Three Code Nexus tools calculate an engagement score, and they disagree, because everyone copied last month's script and then edited their copy. Leo's report, the creator dashboard, and the leaderboard now show three different numbers for the same creator.

What you'll learn

  • PCEP 4.1-4.2: decomposition, positional and keyword arguments, return and None, default arguments, local vs global scope, and simple recursion.

Who you work with

  • Maya Chen

    Senior AI Engineer · Your mentor

  • Leo Martins

    Product Manager

Scenes

  1. 1.One source of truth
  2. 2.Trace the scope
  3. 3.Write the one function
  4. 4.Refactor without breaking it
  5. 5.Functions check

What you leave with

Every Code Nexus surface now calls one engagement_score function. Weights are parameters with defaults, not globals, so the leaderboard's different weighting is an explicit request rather than a divergent copy — and you routed a recursive roll-up through it without breaking its base case.

Previous episode

Messy Data, Real People

Next episode

The Program Crashed, Politely

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