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: introductory

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(M1, M2, m1, m2, V, T):
    return (m1 / M1 + m2 / M2) * (T + 273.15) * .082 / V

def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp) :
    
# 1 - Calculate the amount of substance in moles
    n1 = given_mass1 / molar_mass1
    n2 = given_mass2 / molar_mass2
# 2 - Convert the temperature from Celcius to kelvin  
    Temp_Kelvin = temp + 273.15
# 3 - Enter the gas constant
    R = 0.082
# 4 - Calculate the ideal gas law       
    P1 = (n1 * R * Temp_Kelvin) / volume
    P2 = (n2 * R * Temp_Kelvin) / volume
# 5 - Apply Dalton's law
    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

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

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) :
    #Chemistry PV = nRT
    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  # Gas constant
    T = temp + 273.15  # Kelvin
    n1 = given_mass1 / molar_mass1  # Amount of substance 1
    n2 = given_mass2 / molar_mass2  # Amount of substance 2
    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

R = 0.082
CELSIUS_TO_KELVIN = 273.15

def solution(M1, M2, m1, m2, V, T):
    return ((m1 / M1 + m2 / M2) * R * (T + CELSIUS_TO_KELVIN)) / V

def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp) :  
    n1 = given_mass1 / molar_mass1  # хим. колличество вещества (моль)
    n2 = given_mass2 / molar_mass2  # хим. колличество вещества (моль)
    R = 0.082  # Универсальная газовая постоянная (литр * атм)/(Кельвин * моль)
    T = temp + 273.15  # Температура в Кельвинах
    V = volume  # Объём
    P = ((n1 + n2) * R * T) / V 
    return P


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(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp) :
    R = 0.082;
    n1 = given_mass1 / molar_mass1
    n2 = given_mass2 / molar_mass2
    num = (n1 + n2) * R * (temp + 273.15)
    return num / volume

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


# Pressure (P),mercury/torr (mm Hg, torr)
# Volume (V), given in liters
# Number of moles of gas (n)
# R is the ideal gas constant
# Temperature of the gas (T) measured in degrees Kelvin (K)

    


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

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 = given_mass1 * 0.001 / molar_mass1
    M2 = given_mass2 * 0.001 / molar_mass2
    return (M1 + M2) * 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(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp) :
        R=0.082
        return (given_mass1/molar_mass1)*R*(temp+273.15)/volume+(given_mass2/molar_mass2)*R*(temp+273.15)/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):
  #  P = mRT/V
  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) :
    # Find moles of given gasses
    moles1 = given_mass1 / molar_mass1
    moles2 = given_mass2 / molar_mass2
    # Convert Celcius to Kelvin
    kelvin = temp + 273.15
    gas_constant = 0.082
    
    # Given ideal gas law: PV = nRT
    # P = nRT/V                            (by algebra)
    # P = ((moles1 + moles2)RT)/V          (by substitution)
    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) :
    mass1 = given_mass1 * .001/molar_mass1
    mass2 = given_mass2 * .001/molar_mass2
    newtemp = temp + 273.15
    return ((mass1 + mass2) * .082 * newtemp * 1000) / volume

def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp) :
    R = 0.082 #dm3.atm.K-1.mol-1
    T = 273.15 #Kelvin
    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 += 273.15
    
    return (m1 + m2) * 0.082 * temp / volume * 1000

R = 0.082
C_to_F = 273.15


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


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp) :
    # loi des gaz parfaits : PV=nRT
    # P = nRT/(V) on cherche n, le nombre de moles ... = m/M
    # pour un mélange, P = sum(Pi)
    # donc
    return ((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):
    n1 = given_mass1 / molar_mass1
    n2 = given_mass2 / molar_mass2
    return (n1 + n2) * 0.082 * (temp + 273.15) / volume

def solution(M1, M2, m1, m2, V, T, R=0.082) :
    return R * (T + 273.15) * (m1 / M1 + m2 / M2) / 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) :
    R = 0.082
    P1 = R*given_mass1/molar_mass1*(temp+273.15)/volume
    P2 = R*given_mass2/molar_mass2*(temp+273.15)/volume
    return P1+P2

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) :
    return ((given_mass1/molar_mass1) * 0.082 * (temp + 273.15)) / volume \
        + ((given_mass2/molar_mass2) * 0.082 * (temp + 273.15)) / volume


def solution(M1,M2,m1,m2,V,T) :
    """ Return Total Pressure P=nRT/V"""
    T += 273.15
    R = 0.082
    n = m1/M1 + m2/M2
    P=(m1/M1 +m2/M2)*R*T/V
    return P

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) :
    total = (((given_mass1/molar_mass1)*(0.082)*(temp+273.15))/volume) + (((given_mass2/molar_mass2)*(0.082)*(temp+273.15))/volume)
    return total

# Formula adapted from https://www.wikihow.com/Calculate-Partial-Pressure

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

def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp) :    
#   Calculate the amount of substance in moles
    n1 = given_mass1 / molar_mass1
    n2 = given_mass2 / molar_mass2
#   Convert the temperature from Celcius to kelvin  
    Temp_Kelvin = temp + 273.15
#   Enter the gas constant
    R_gasConst = 0.082
#   Calculate the ideal gas law       
    P1 = (n1 * R_gasConst * Temp_Kelvin) / volume
    P2 = (n2 * R_gasConst * Temp_Kelvin) / volume
#   Dalton's law
    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) :
    P1 = ((given_mass1 / molar_mass1) * 0.082 * (temp + 273.15)) / volume
    P2 = ((given_mass2 / molar_mass2) * 0.082 * (temp + 273.15)) / volume
    P_total = P1 + P2
    return P_total

def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp) :
# PV = nRT
    return ((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) :
    n1=given_mass1/molar_mass1
    n2=given_mass2/molar_mass2
    T=273.15+temp
    R=0.082   #gas constant value
    return ((n1+n2)*R*T)/volume
    # your code goes here


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


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) :
    return ((((float(given_mass1)/float(molar_mass1))+(float(given_mass2)/float(molar_mass2)))*0.082*(float(temp)+273.15))/float(volume))

def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp) :
    #P=nRT/V
    #no of molecules=total mass/molar mass
    n=(given_mass1/molar_mass1)+(given_mass2/molar_mass2)
    R=0.082
    Pressure=n*R*(temp+273.15)/volume
    return Pressure

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

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

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)


def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp) :
    # your code goes here
    mass1 = given_mass1 * 0.001/molar_mass1;
    mass2 = given_mass2 * 0.001/molar_mass2;
    temp = temp + 273.15
    return (mass1+mass2)*0.082*temp/volume*1000

R = .082
zK = 273.15

def solution(m1, m2, M1, M2, V, T):
    return (M1 / m1 + M2 / m2) * R * (T + zK) / V

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) :    
    return (((molar_mass1**-1)*given_mass1 + (molar_mass2**-1)*given_mass2)*R*(temp+273.15))/volume

def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp) :
    # PV = nRT  Ideal Gas Law
    #
    # P = nRT / V
    #
    # P = Pressure (in atmospheres)
    # n = Number of moles of gas
    # R = Ideal Gas Constant (0.082)
    # T = Temperature (degrees Kelvin)
    # V = Volume of gas (liters)
    
    R = 0.082
    T = temp + 273.15
    moles = given_mass1 / molar_mass1 + given_mass2 / molar_mass2
    
    return moles * R * T / volume


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

def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp) :
    n1, n2 = given_mass1 / molar_mass1, given_mass2 / molar_mass2
    R = 0.082
    T = temp + 273.15
    return (n1 + n2) * R * T / 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
    return (m1 + m2) * 0.082 * T / volume * 1000

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) :
    # PV=nRT
    # n = n1 + n2
    # nx = gx / (g/mol)x
    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
    
    # your code goes here


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

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

"""
Answer => Combine Mass1 & Mass2, multiply by 0.082, multiply by Temperature, divide by the Volume, multiply by 1000
"""

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

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

def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp) :
    # your code goes here
    n = (given_mass1/molar_mass1) + (given_mass2/molar_mass2)
    return n * 0.082 * (temp +273.15) /(volume)

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

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

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
    R = 0.082
    return n*R*T/V

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

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

R = 0.082

def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp) :
    # P = nRT/V
    # n = nr of mols
    # Ptotal = P1 + P2
    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) :
    M1 = given_mass1 * 0.001 / molar_mass1
    M2 = given_mass2 * 0.001 / molar_mass2
    T = temp + 273.15
    R = 0.082
    return (M1 + M2) * R * T / volume * 1000

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

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

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)
    
   # your code goes here


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, m1, m2, v, t):
    R = 0.082
    t += 273.15
    return m1*R*t/(M1*v) + m2*R*t/(M2*v)

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
    
    
    
#     For people wanting to do this kata, here is the formula:
# Mass1 = mole1 * 0.001/Mass1;

# Mass2 = mole2 * 0.001/Mass2;

# Temperature >> Convert to Kelvin (add 273.15)

# Answer => Combine Mass1 & Mass2, multiply by 0.082, multiply by Temperature, divide by the Volume, multiply by 1000


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

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) :
#Mass1 = mole1 * 0.001/Mass1;
#Mass2 = mole2 * 0.001/Mass2;
#Temperature >> Convert to Kelvin (add 273.15)
#Combine Mass1 & Mass2, multiply by 0.082, multiply by Temperature, divide by the Volume, multiply by 1000
    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):
    #    (n R T / V)1 + (n R T / V)2
    R = 0.082
    T = temp + 273.15
    V = volume
    n1 = given_mass1 / molar_mass1
    n2 = given_mass2 / molar_mass2
    return (n1 * R * T  / V) + (n2 * R * T  / V)

def solution(molar_mass1, molar_mass2, given_mass1, given_mass2, volume, temp) :
    R = 0.082 #dm3.atm.K-1.mol-1
    return (given_mass1/molar_mass1 + given_mass2/molar_mass2)*R*(temp+273.15)/volume

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

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) :
    # your code goes here
    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):
    # Ideal gas law: P = nRT / V
    
    # Gas constant
    R = 0.082
    
    # Volume
    V = volume
    
    # Temperature
    T = temp + 273.15
    
    # Moles
    n_1 = given_mass1/molar_mass1
    n_2 = given_mass2/molar_mass2
    n_tot = n_1 + n_2

    # Pressure
    P = n_tot * R * T / V
    
    return P