Given the moleculer mass of two molecules ( __M1__ and __M2__ ), their masses present ( __m1__ and __m2__ ) in a vessel of volume ( __V__ ) at a specific temperature ( __T__ ). Find the total pressure exerted by the molecules ( __Ptotal__ ) .

input
====

Six values : 

- __m1__
- __m2__
- __M1__
- __M2__
- __V__
- __T__

output
==== 

One value : 

- __Ptotal__ 

notes
====

Units for each of the following are given as under : 

- _m1_ = gram 
- _m2_ = gram
- _M1_ = _gram.mole^(-1)_
- _M2_ = _gram.mole^(-1)_
- _V_             = _dm^(3)_
- _T_             = Celsius
- __Ptotal__ = atmpspheric pressure (_atm_)

Remember : Temperature is given in Celsius while SI unit is Kelvin (_K_)

0 Celsius = 273.15Kelvin

The gas constant (_R_) has value of _0.082dm^(3).atm.K^(-1).mol^(-1)_

Difficulty: EASY
Tags: Fundamentals

Starter code:
def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp) :
	

Solutions:
def solution(M1, M2, m1, m2, V, T):
	return (m1 / M1 + m2 / M2) * 0.082 * (T + 273.15) / V


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	n1 = given_mass1 / molar_mass1
	n2 = given_mass2 / molar_mass2
	Temp_Kelvin = temp + 273.15
	R = 0.082
	P1 = n1 * R * Temp_Kelvin / volume
	P2 = n2 * R * Temp_Kelvin / volume
	P = P1 + P2
	return P


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	t = temp + 273.15
	R = 0.082
	n_mol1 = given_mass1 / molar_mass1
	n_mol2 = given_mass2 / molar_mass2
	return n_mol1 * R * t / volume + n_mol2 * R * t / volume


def pressure(molar_mass, given_mass, v, t):
	return given_mass * 0.082 * (t + 273.15) / molar_mass / v

def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	return pressure(molar_mass1, given_mass1, volume, temp) + pressure(molar_mass2, given_mass2, volume, temp)


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	temp += 273.15
	R = 0.082
	n = given_mass1 / molar_mass1 + given_mass2 / molar_mass2
	return n * R * temp / volume


solution = lambda m, n, M, N, V, T: (M / m + N / n) * 0.082 * (T + 273.15) / V


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	P1 = given_mass1 / molar_mass1 * 0.082 * (temp + 273.15) / volume
	P2 = given_mass2 / molar_mass2 * 0.082 * (temp + 273.15) / volume
	return P1 + P2


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	R = 0.082
	T = temp + 273.15
	n1 = given_mass1 / molar_mass1
	n2 = given_mass2 / molar_mass2
	return (n1 + n2) * R * T / volume


class solution:
	__truediv__ = __abs__ = __sub__ = __lt__ = __init__ = lambda x, *y: print() if len(y) > 3 else x


solution = lambda a, b, c, d, e, f: (c / a + d / b) * 0.082 * (f + 273.15) / e


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	rez1 = given_mass1 / molar_mass1 * 0.082 * (temp + 273.15) / volume
	rez2 = given_mass2 / molar_mass2 * 0.082 * (temp + 273.15) / volume
	return rez1 + rez2


def solution(M1, M2, m1, m2, v, t):
	M1 = m1 * 0.001 / M1
	M2 = m2 * 0.001 / M2
	t = t + 273.15
	r = 0.082
	return (M1 + M2) * r * t / v * 1000


def solution(mm1, mm2, gm1, gm2, volume, temp):
	Mass1 = gm1 * 0.001 / mm1
	Mass2 = gm2 * 0.001 / mm2
	Temperature = temp + 273.15
	answer = (Mass1 + Mass2) * 0.082 * Temperature / volume * 1000
	return answer


def solution(m1, m2, M1, M2, V, t):
	n = M1 / m1 + M2 / m2
	R = 0.082
	T = t + 273.15
	P = n * R * T / V
	return P


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	mass1 = given_mass1 * 0.001 / molar_mass1
	mass2 = given_mass2 * 0.001 / molar_mass2
	combined_mass = mass1 + mass2
	kelvin = temp + 273.15
	return combined_mass * 0.082 * kelvin / volume * 1000


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	return (given_mass1 * 0.001 / molar_mass1 + given_mass2 * 0.001 / molar_mass2) * 82 * (temp + 273.15) / volume


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	(m1, m2) = (given_mass1 / molar_mass1, given_mass2 / molar_mass2)
	temp = temp + 273.15
	return (m1 + m2) * 0.082 * temp / volume


def solution(mm1, mm2, gm1, gm2, v, t):
	return (gm1 / mm1 + gm2 / mm2) * (t + 273.15) * 0.082 / v


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	M1 = given_mass1 * 0.001 / molar_mass1
	M2 = given_mass2 * 0.001 / molar_mass2
	temp = temp + 273.15
	R = 0.082
	return (M1 + M2) * R * temp / volume * 1000


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	press = (given_mass1 / molar_mass1 + given_mass2 / molar_mass2) * 0.082 * (temp + 273.15) * (1 / volume)
	return press


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	moles1 = given_mass1 / molar_mass1
	moles2 = given_mass2 / molar_mass2
	kelvin = temp + 273.15
	gas_constant = 0.082
	return (moles1 + moles2) * gas_constant * kelvin / volume


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	m1 = given_mass1 * 0.001 / molar_mass1
	m2 = given_mass2 * 0.001 / molar_mass2
	t = temp + 273.15
	R = 0.082
	p = (m1 + m2) * R * t / volume * 1000
	return p


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	R = 0.082
	T = 273.15
	p1 = given_mass1 / molar_mass1 * R * (temp + T) / volume
	p2 = given_mass2 / molar_mass2 * R * (temp + T) / volume
	return p1 + p2


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	m1 = given_mass1 * 0.001 / molar_mass1
	m2 = given_mass2 * 0.001 / molar_mass2
	temp = temp + 273.15
	r = 0.082
	return (m1 + m2) * r * temp / volume * 1000


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	pressure = (given_mass1 / molar_mass1 + given_mass2 / molar_mass2) * (temp + 273.15) * 0.082 / volume
	return pressure


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	molar_mass1 = given_mass1 * 0.001 / molar_mass1
	molar_mass2 = given_mass2 * 0.001 / molar_mass2
	tempKelvin = temp + 273.15
	R = 0.082
	Ptotal = (molar_mass1 + molar_mass2) * R * tempKelvin / volume * 1000
	return Ptotal


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	n1 = given_mass1 / molar_mass1
	n2 = given_mass2 / molar_mass2
	Temp_Kelvin = temp + 273.15
	R_gasConst = 0.082
	P1 = n1 * R_gasConst * Temp_Kelvin / volume
	P2 = n2 * R_gasConst * Temp_Kelvin / volume
	Pressure = P1 + P2
	return Pressure


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	(Mass1, Mass2) = (given_mass1 * 0.001 / molar_mass1, given_mass2 * 0.001 / molar_mass2)
	Temperature = temp + 273.15
	return (Mass1 + Mass2) * 0.082 * Temperature / volume * 1000


def solution(M1, M2, m1, m2, v, t):
	return (m1 / M1 + m2 / M2) * 0.082 * (t + 273.15) / v


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	n1 = given_mass1 / (1000 * molar_mass1)
	n2 = given_mass2 / (1000 * molar_mass2)
	return 0.082 * (n1 + n2) * (temp + 273.15) / (volume / 1000)


def solution(mm1, mm2, m1, m2, volume, temp):
	return (m1 / mm1 + m2 / mm2) * 0.082 * (273.15 + temp) / volume


solution = lambda molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp: (given_mass1 / molar_mass1 + given_mass2 / molar_mass2) * 0.082 * (temp + 273.15) / volume


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	mass1 = given_mass1 / molar_mass1
	mass2 = given_mass2 / molar_mass2
	temp = temp + 273.15
	return mass1 * 0.082 * temp / volume + mass2 * 0.082 * temp / volume


solution = lambda M1, M2, m1, m2, V, t: (m1 / M1 + m2 / M2) * 0.082 * (t + 273.15) / V


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	R = 0.082
	T = temp + 273.15
	moles = given_mass1 / molar_mass1 + given_mass2 / molar_mass2
	return moles * R * T / volume


def solution(mole1, mole2, mass1, mass2, volume, temp):
	div1 = mass1 / float(mole1)
	div2 = mass2 / float(mole2)
	return 0.082 / float(volume) * (temp + 273.15) * (div1 + div2)


def solution(gmol1, gmol2, m1, m2, volume, temp):
	return (m1 / gmol1 + m2 / gmol2) * 0.082 * (temp + 273.15) / volume


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	n_moles = given_mass1 / molar_mass1 + given_mass2 / molar_mass2
	r_constant = 0.082
	temp_kelvin = 273.15 + temp
	pressure = r_constant * n_moles * temp_kelvin / volume
	return pressure


def solution(m_mass1, m_mass2, g_mass1, g_mass2, vol, temp):
	return (g_mass1 / m_mass1 + g_mass2 / m_mass2) * 0.082 * (temp + 273.15) / vol


def solution(m1, m2, M1, M2, V, T):
	m1 = M1 * 0.001 / m1
	m2 = M2 * 0.001 / m2
	T += 273.15
	R = 0.082
	return (m1 + m2) * R * T / V * 1000


R = 0.082

def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	n = given_mass1 / molar_mass1 + given_mass2 / molar_mass2
	T = temp + 273.15
	V = volume
	P = n * R * T / V
	return P


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	mass_1 = given_mass1 / molar_mass1
	mass_2 = given_mass2 / molar_mass2
	temperature = temp + 273.15
	return (mass_1 + mass_2) * 0.082 * temperature / volume


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	print('define parametros')
	dm1 = molar_mass1
	dm2 = molar_mass2
	dg1 = given_mass1
	dg2 = given_mass2
	dvo = volume
	dte = temp
	return 0.082 / dvo * (dg2 / dm2 + dg1 / dm1) * (dte + 273.15)


kelv_t = lambda x: x + 273.15
r = 0.082
solution = lambda molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp: r * kelv_t(temp) / volume * (given_mass1 / molar_mass1 + given_mass2 / molar_mass2)


def solution(M1, M2, gm1, gm2, v, t):
	Mass1 = gm1 * 0.001 / M1
	Mass2 = gm2 * 0.001 / M2
	temp = t + 273.15
	return (Mass1 + Mass2) * 0.082 * temp / v * 1000


solution = lambda M1, M2, m1, m2, V, T: (m1 / M1 + m2 / M2) * 0.082 * (T + 273.15) / V


def solution(m1, m2, g1, g2, v, t):
	return (g1 * 0.001 / m1 + g2 * 0.001 / m2) * 0.082 * (t + 273.15) / v * 1000


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	pressure_1 = given_mass1 / molar_mass1 * 0.082 * (temp + 273.15) / volume
	pressure_2 = given_mass2 / molar_mass2 * 0.082 * (temp + 273.15) / volume
	return pressure_1 + pressure_2


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	R = 0.082
	Mass1 = given_mass1 / molar_mass1
	Mass2 = given_mass2 / molar_mass2
	return (Mass1 + Mass2) * R / volume * (temp + 273.15)


def solution(mm1, mm2, gm1, gm2, volume, temp):
	R = 0.082
	return R * (gm1 / mm1 + gm2 / mm2) * (temp + 273.15) / volume


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp):
	R = 0.082
	V = volume
	T = temp + 273.15
	n_1 = given_mass1 / molar_mass1
	n_2 = given_mass2 / molar_mass2
	n_tot = n_1 + n_2
	P = n_tot * R * T / V
	return P