Source: https://mokxi.com/learn/path/electrician-math-with-python
Updated: 2026-11-20

All paths

# Electrician math with Python

The arithmetic of the trade as Python programs on a Raspberry Pi: Ohm's and Watt's laws, voltage drop, conduit fill, box fill, a load calculation, motor tables, and a job calculator you build and extend.

Raspberry Pi 4 Model B Free 7 lessons 5 h 7 chapters 1,559 XP Electrical · Intermediate +150 XP

0 of 7 done

Start the course free Ohm's and Watt's laws in Python Lesson plan for teachers

What you will build

## 0 projects, built step by step

7 lessons in 7 chapters, about 5 hours on a simulated Raspberry Pi 4 Model B. Free, in your browser, every step checked by the simulator.

The map

## Chapter by chapter

Each lesson opens when the one before it is done, and each chapter ends in a project.

Chapter 1

## Ohm's and Watt's laws

Two laws as functions, and a breaker picked at 125 percent.

Open 236 XP

### Ohm's and Watt's laws in Python

Turn I = V / R and P = V x I into Python functions, size a 1500 W heater at 120 and 240 V, find its element's resistance, and pick its breaker with the 125 percent rule.

0 of 6 steps

Start What is in it

3 questions, graded as you go.

Chapter 2

## Voltage drop

The K formula, the 3 percent check and the longest run.

Locked 236 XP

### Voltage drop in Python

The electrician's VD = 2KIL / CM formula as a function, the 3 percent recommendation as an if, a loop that finds the smallest wire that meets it, 240 V against 120 V, and the longest run a wire allows.

0 of 6 steps

3 questions, graded as you go.

Chapter 3

## Conduit fill

Chapter 9 areas and the 40, 31 and 53 percent rules.

Locked 205 XP

### Conduit fill in Python

Add up THHN conductor areas from NEC Chapter 9 Table 5, compare them with 40 percent of EMT's area from Table 4, let a function pick the trade size, mix gauges, and code the one- and two-wire rules.

0 of 5 steps

3 questions, graded as you go.

Chapter 4

## Box fill

Allowances, volumes and the smallest box that fits.

Locked 205 XP

### Box fill in Python

Count conductor allowances the NEC 314.16 way with a function and keyword arguments, compare with a box's volume, see what 12 AWG costs, and let a list of boxes pick the smallest that fits.

0 of 5 steps

3 questions, graded as you go.

Chapter 5

## Load calculation

Volt-amps, demand factors and the service size.

Locked 205 XP

### Load calculation in Python

A simplified dwelling load calculation as a program: volt-amps per square foot, kitchen and laundry circuits, the demand factor as a function, fixed appliances from a dict, the service size, and what an EV charger does to it.

0 of 5 steps

3 questions, graded as you go.

Chapter 6

## Motor tables

Table FLC, 125 percent wire, 250 percent breakers.

Locked 236 XP

### Motor tables in Python

Look up a motor's full-load current from NEC Table 430.248 with a tuple-keyed dict, size its conductors at 125 percent, its overload from the nameplate, its breaker at up to 250 percent, and handle a motor the table does not have.

0 of 6 steps

3 questions, graded as you go.

Chapter 7

## Boss build

A command-line job calculator on the Pi.

Locked 236 XP

### Boss: a job calculator

Put the course in one Python program: a command-line calculator on the Pi that reads commands typed in the Serial Monitor for voltage drop, conduit fill, box fill and motor circuits, survives bad input, and takes a new command you add yourself.

0 of 6 steps

3 questions, graded as you go.

Syllabus

## Every lesson in the course

All 7 lessons, in order, each with what it covers. Any of them opens in the editor right away.

Chapter 1

### Ohm's and Watt's laws

- Ohm's and Watt's laws in Python Turn I = V / R and P = V x I into Python functions, size a 1500 W heater at 120 and 240 V, find its element's resistance, and pick its breaker with the 125 percent rule.

Chapter 2

### Voltage drop

- Voltage drop in Python The electrician's VD = 2KIL / CM formula as a function, the 3 percent recommendation as an if, a loop that finds the smallest wire that meets it, 240 V against 120 V, and the longest run a wire allows.

Chapter 3

### Conduit fill

- Conduit fill in Python Add up THHN conductor areas from NEC Chapter 9 Table 5, compare them with 40 percent of EMT's area from Table 4, let a function pick the trade size, mix gauges, and code the one- and two-wire rules.

Chapter 4

### Box fill

- Box fill in Python Count conductor allowances the NEC 314.16 way with a function and keyword arguments, compare with a box's volume, see what 12 AWG costs, and let a list of boxes pick the smallest that fits.

Chapter 5

### Load calculation

- Load calculation in Python A simplified dwelling load calculation as a program: volt-amps per square foot, kitchen and laundry circuits, the demand factor as a function, fixed appliances from a dict, the service size, and what an EV charger does to it.

Chapter 6

### Motor tables

- Motor tables in Python Look up a motor's full-load current from NEC Table 430.248 with a tuple-keyed dict, size its conductors at 125 percent, its overload from the nameplate, its breaker at up to 250 percent, and handle a motor the table does not have.

Chapter 7

### Boss build

- Boss: a job calculator Put the course in one Python program: a command-line calculator on the Pi that reads commands typed in the Serial Monitor for voltage drop, conduit fill, box fill and motor circuits, survives bad input, and takes a new command you add yourself.

Kits

## Build it on your bench too

Every lesson runs in the simulator with nothing to buy. When you want the real thing, these kits have the parts.

Have a kit already?

### Find your kit

Pick the starter kit you own and run every lesson in its manual with the same parts on the same pins.
See every kit

Questions

## About Electrician math with Python

Is Electrician math with Python free?

Yes. All 7 lessons of Electrician math with Python are free and run in your browser, with nothing to install and no parts to buy before you start.

Do I need a real Raspberry Pi 4 Model B?

No. Every lesson runs on a simulated Raspberry Pi 4 Model B with its parts on the canvas, and the simulator checks each step as you go. When you want to build it for real, the same wiring and code work on a real board.

How long does Electrician math with Python take?

About 5 hours: 7 lessons in 7 chapters, each one a few short steps. Your progress is kept, so you can stop after any lesson and pick up where you left off.

Where do I start?

With "Ohm's and Watt's laws in Python", and each lesson builds on the one before it. New to circuits? Electronics basics is the course that starts from zero.
