<reponame>sameer-h/ENGR102
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
By submitting this assignment , I agree to the following :
"Aggies do not lie , cheat , or steal , or tolerate those who do ."
"I have not given or received any unauthorized aid on this assignment ."

Names: <NAME>

ENGR 102 - 214

Professor: Dr.Socolofsky
Assignment: Lab 02b
Date: 09/04/2019
<EMAIL>
Script: Labo02bIdealGas.py
Individual Lab

Using PV = nRT (Ideal Gas Formula) to find the number of atoms of helium in a 40cm balloon and also accounting for error rates.


"""

print("In this program I will use the ideal gas formula PV = nRT in order to find the number of atoms of helium in a specific balloon")
print("I will be using absolute units for pressure and temperature as well as Helium's mass - 4.02 amu")
print("\n We're given pressure in 1.0473 bar, Temp of 98 degree C, Volume of 40cm - +- 5 percent error")

#pressure_bar = 1.0473
#Bar to pascal = bar * 100000
pressure = 104730.0 #in pascals
temp = 371.15 #98+273.15 
volume = 40.0
volfiveplus = 42.0 #+5% 
volfiveminus = 38.0 #-5%

avagadro_cst = (6.02214076*10**23)

r_cst = 8.31432

print("\nTo find atoms we need to find 'n' which is the moles of helium in balloon")

n = ((pressure * volume) / (r_cst * temp))

n_plusfive = ((pressure * volfiveplus) / (r_cst * temp))

n_minusfive = ((pressure * volfiveminus) / (r_cst * temp))

#Finding number of atoms from each mol

atm_plusfive = (n_plusfive * avagadro_cst) #+5% error

atm_minusfive = (n_minusfive * avagadro_cst) #-5% error

atm = (n * avagadro_cst) #Normal vol

print("\nThe number of helium atoms in 40cm balloon is", atm, "atoms")
print("Now with +5% error volume it is", atm_plusfive, "atoms. \nWith -5% error volume it is", atm_minusfive, "atoms")









#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
By submitting this assignment , I agree to the following :
"Aggies do not lie , cheat , or steal , or tolerate those who do ."
"I have not given or received any unauthorized aid on this assignment ."

Names: <NAME>

ENGR 102 - 214

Professor: Dr.Socolofsky
Assignment: Lab 02b
Date: 09/04/2019
<EMAIL>
Script: Labo02bIdealGas.py
Individual Lab

Using PV = nRT (Ideal Gas Formula) to find the number of atoms of helium in a 40cm balloon and also accounting for error rates.


"""

print("In this program I will use the ideal gas formula PV = nRT in order to find the number of atoms of helium in a specific balloon")
print("I will be using absolute units for pressure and temperature as well as Helium's mass - 4.02 amu")
print("\n We're given pressure in 1.0473 bar, Temp of 98 degree C, Volume of 40cm - +- 5 percent error")

#pressure_bar = 1.0473
#Bar to pascal = bar * 100000
pressure = 104730.0 #in pascals
temp = 371.15 #98+273.15 
volume = 40.0
volfiveplus = 42.0 #+5% 
volfiveminus = 38.0 #-5%

avagadro_cst = (6.02214076*10**23)

r_cst = 8.31432

print("\nTo find atoms we need to find 'n' which is the moles of helium in balloon")

n = ((pressure * volume) / (r_cst * temp))

n_plusfive = ((pressure * volfiveplus) / (r_cst * temp))

n_minusfive = ((pressure * volfiveminus) / (r_cst * temp))

#Finding number of atoms from each mol

atm_plusfive = (n_plusfive * avagadro_cst) #+5% error

atm_minusfive = (n_minusfive * avagadro_cst) #-5% error

atm = (n * avagadro_cst) #Normal vol

print("\nThe number of helium atoms in 40cm balloon is", atm, "atoms")
print("Now with +5% error volume it is", atm_plusfive, "atoms. \nWith -5% error volume it is", atm_minusfive, "atoms")
#!/usr/bin/env python3 # -*- coding: utf-8 -*- By submitting this assignment , I agree to the following : "Aggies do not lie , cheat , or steal , or tolerate those who do ." "I have not given or received any unauthorized aid on this assignment ."  Names: <NAME>  ENGR 102 - 214  Professor: Dr.Socolofsky Assignment: Lab 02b Date: 09/04/2019 <EMAIL> Script: Labo02bIdealGas.py Individual Lab  Using PV = nRT (Ideal Gas Formula) to find the number of atoms of helium in a 40cm balloon and also accounting for error rates. #pressure_bar = 1.0473 #Bar to pascal = bar * 100000 #in pascals #98+273.15 #+5% #-5% #Finding number of atoms from each mol #+5% error #-5% error #Normal vol