E-Code

Coulomb's law: force, field, three charges — a TI-84 Plus CE program

By E-Code · updated

COULOMB is a TI-BASIC program for the TI-84 Plus CE. Force between two point charges (attract or repel), the field and potential of a point charge at a distance, or the net force on a third charge from two others on a line (positive = toward +x). k = 8.9875517923ᴇ9 N·m²/C², charges in coulombs.

What it asks for and what it shows

It asks for 3 values at its prompts, after you pick option 1 from its menu. In the example below it shows F (N), ATTRACT.

Example run

One of its oracle test cases: “opposite charges attract”. The inputs are typed in order, and the results are the values the case expects on the screen.

StepValue
You enter
Menuoption 1
Input 13ᴇ⁻6
Input 2⁻5ᴇ⁻6
Input 30.2
The screen shows
F (N)=3.370331922
TextATTRACT

How it's checked

7 test cases, each checked against an independent method. Replayed key by key on a virtual TI-84 Plus CE, they make 27 checks.

How E-Code checks every program

Run it or put it on your calculator

Related programs

All TI-84 Plus CE physics programs · All TI-84 Plus CE programs