E-Code

Combined gas law with °C or K — a TI-84 Plus CE program

By E-Code · updated

COMBGAS is a TI-BASIC program for the TI-84 Plus CE. P1V1/(n1T1) = P2V2/(n2T2): type the two states as lists with U for the one unknown (a 0 also works where 0 is impossible; a Celsius temperature of 0 is 0 °C, so STP problems work); works in Celsius or Kelvin (Celsius is converted, the classic mistake) with any pressure and volume units used on both sides.

What it asks for and what it shows

It asks for 2 values at its prompts, after you pick option 2 from its menu. In the example below it shows V2, RATIO.

Example run

One of its oracle test cases: “OpenStax Ex 9.10: 153 atm, 13.2 L, 27 C to 3.13 atm, 37 C”. The inputs are typed in order, and the results are the values the case expects on the screen.

StepValue
You enter
Menuoption 2
Input 1{153,13.2,1,27}
Input 2{3.13,0,1,37}
The screen shows
V2=666.7368552
RATIO=1

How it's checked

12 test cases, each checked against the textbook formula it uses. Replayed key by key on a virtual TI-84 Plus CE, they make 48 checks.

How E-Code checks every program

Run it or put it on your calculator

Related programs

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