Ideal gas PV=nRT: leave one blank — a TI-89 Titanium program
GAS89 is a TI-89 BASIC program for the TI-89 Titanium. Type three of pressure, volume (L), moles and temperature and leave the unknown BLANK; drop-downs pick atm, kPa or mmHg and kelvin or Celsius, and R is chosen to match (0.08206, 8.314 or 62.36).
What it asks for and what it shows
It asks for 4 values at its prompts, after you pick options 1, 2 from its menu. In the example below it shows P, V L, N MOL, T, T K, R.
Example run
One of its oracle test cases: “STP in atm and C: moles”. The inputs are typed in order, and the results are the values the case expects on the screen.
| Step | Value |
|---|---|
| You enter | |
| Menu | option 1 |
| Menu | option 2 |
| Input 1 | 1 |
| Input 2 | 22.4 |
| Input 3 | |
| Input 4 | 0 |
| The screen shows | |
P= | 1 |
V L= | 22.4 |
N MOL= | 0.9993767493 |
T= | 0 |
T K= | 273.15 |
R= | 0.082057366 |
How it's checked
6 test cases, each checked against the textbook formula it uses. Replayed key by key on a virtual TI-89 Titanium, they make 43 checks.
How E-Code checks every program
Run it or put it on your calculator
- Open the library in the TI-89 Titanium calculator and pick “Ideal gas PV=nRT: leave one blank” (GAS89).
- Put it on your own calculator with a computer and a USB cable, or type it in by hand.
Related programs
- Limiting reagent for any number of reactants
- Titration curve: pH for a list of volumes
- Molar mass from a chemical formula
All TI-89 Titanium chemistry programs · All TI-89 Titanium programs