Skip to content

Instantly share code, notes, and snippets.

@AwlsomeAlex
Last active March 28, 2018 01:27
Show Gist options
  • Save AwlsomeAlex/03d1e2c10fcf0bce89e5309abb50ed8f to your computer and use it in GitHub Desktop.
Save AwlsomeAlex/03d1e2c10fcf0bce89e5309abb50ed8f to your computer and use it in GitHub Desktop.
Automated Solver for the Chemistry Equation (PV=nRT) [Gas Laws] [Compatible with TI-84 Plus CE]
Disp "Haddock Solver - PV=nRT"
Disp ""
Disp "Please Select a Calcuation"
Disp "=========================="
Disp "1) Pressure"
Disp "2) Volume"
Disp "3) Mass (g)"
Disp "4) Temperature (*C)"
Disp "5) Information"
Prompt C
Disp "=========================="
If C=1:Then
Disp "Please enter mass (g):"
Prompt M
Disp "Please enter Atomic Mass:"
Prompt A
M/A→N
Disp "Please enter volume (L):"
Prompt V
Disp "Please enter Temp (*C):"
Prompt C
C+273→T
(N*0.0821*T)/V→P
Disp "=========================="
Disp "The Pressure (atm) is:",P
End
If C=2:Then
Disp "Is the Pressure in atm (1)"
Disp "Or mmHg (2)?"
Prompt J
If J=1:Then
Disp "Please enter pressure:"
Prompt P
End
If J=2:Then
Disp "Please enter pressure:"
Prompt L
L/760→P
End
Disp "Please enter Temp (*C):"
Prompt C
C+273→T
Disp "Please enter mass (g):"
Prompt M
Disp "Please enter Atomic Mass:"
Prompt A
M/A→N
(N*0.0821*T)/P→V
Disp "=========================="
Disp "The Volume (L) is:",V
End
If C=3:Then
Disp "Is the Pressure in atm (1)"
Disp "Or mmHg (2)?"
Prompt J
If J=1:Then
Disp "Please enter pressure:"
Prompt P
End
If J=2:Then
Disp "Please enter pressure:"
Prompt L
L/760→P
End
Disp "Please enter Temp (*C):"
Prompt C
C+273→T
Disp "Please enter Atomic Mass:"
Prompt A
Disp "Please enter volume (L):"
Prompt V
(P*V)/(0.0821*T)→N
N*A→M
Disp "=========================="
Disp "The Mass (g) is:",M
End
If C=4:Then
Disp "Is the Pressure in atm (1)"
Disp "Or mmHg (2)?"
Prompt J
If J=1:Then
Disp "Please enter pressure:"
Prompt P
End
If J=2:Then
Disp "Please enter pressure:"
Prompt L
L/760→P
End
Disp "Please enter mass (g):"
Prompt M
Disp "Please enter Atomic Mass:"
Prompt A
M/A→N
Disp "Please enter volume (L):"
Prompt V
(P*V)/(N*0.0821)→T
T-273→C
Disp "=========================="
Disp "The Temp (*C) is:",C
End
If C=5:Then
Disp "Haddock Solver - PV=nRT"
Disp "Created by AwlsomeAlex"
Disp "Licensed GNU GPLv3"
Disp "Version 1.0"
Disp ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment