E-Code

Doppler effect for sound — a TI-84 Plus CE program

By E-Code · updated

DOPPLER is a TI-BASIC program for the TI-84 Plus CE. Frequency heard when the source and/or the listener move (speeds toward each other positive, away negative), with the wavelength in front of the source; refuses a supersonic source.

What it asks for and what it shows

It asks for 4 values at its prompts. In the example below it shows HEARD, SHIFT, LAMBDA.

Example run

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

StepValue
You enter
Input 1343
Input 2700
Input 330
Input 40
The screen shows
HEARD=767.0926518
SHIFT=67.09265176
LAMBDA=0.4471428571

How it's checked

4 test cases, each checked against an independent method. Replayed key by key on a virtual TI-84 Plus CE, they make 18 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