functions useful for doing molecular chemistry molaritytonormality molestopressure molestovolume pressureandvolumetotemperature convert molarity to normality volume is taken in litres wikipedia reference https en wikipedia orgwikiequivalentconcentration wikipedia reference https en wikipedia orgwikimolarconcentration molaritytonormality2 3 1 0 31 20 molaritytonormality4 11 4 5 7 8 convert moles to pressure ideal gas laws are used temperature is taken in kelvin volume is taken in litres pressure has atm as si unit wikipedia reference https en wikipedia orgwikigaslaws wikipedia reference https en wikipedia orgwikipressure wikipedia reference https en wikipedia orgwikitemperature molestopressure0 82 3 300 90 molestopressure8 2 5 200 10 convert moles to volume ideal gas laws are used temperature is taken in kelvin volume is taken in litres pressure has atm as si unit wikipedia reference https en wikipedia orgwikigaslaws wikipedia reference https en wikipedia orgwikipressure wikipedia reference https en wikipedia orgwikitemperature molestovolume0 82 3 300 90 molestovolume8 2 5 200 10 convert pressure and volume to temperature ideal gas laws are used temperature is taken in kelvin volume is taken in litres pressure has atm as si unit wikipedia reference https en wikipedia orgwikigaslaws wikipedia reference https en wikipedia orgwikipressure wikipedia reference https en wikipedia orgwikitemperature pressureandvolumetotemperature0 82 1 2 20 pressureandvolumetotemperature8 2 5 3 60 convert molarity to normality volume is taken in litres wikipedia reference https en wikipedia org wiki equivalent_concentration wikipedia reference https en wikipedia org wiki molar_concentration molarity_to_normality 2 3 1 0 31 20 molarity_to_normality 4 11 4 5 7 8 convert moles to pressure ideal gas laws are used temperature is taken in kelvin volume is taken in litres pressure has atm as si unit wikipedia reference https en wikipedia org wiki gas_laws wikipedia reference https en wikipedia org wiki pressure wikipedia reference https en wikipedia org wiki temperature moles_to_pressure 0 82 3 300 90 moles_to_pressure 8 2 5 200 10 convert moles to volume ideal gas laws are used temperature is taken in kelvin volume is taken in litres pressure has atm as si unit wikipedia reference https en wikipedia org wiki gas_laws wikipedia reference https en wikipedia org wiki pressure wikipedia reference https en wikipedia org wiki temperature moles_to_volume 0 82 3 300 90 moles_to_volume 8 2 5 200 10 convert pressure and volume to temperature ideal gas laws are used temperature is taken in kelvin volume is taken in litres pressure has atm as si unit wikipedia reference https en wikipedia org wiki gas_laws wikipedia reference https en wikipedia org wiki pressure wikipedia reference https en wikipedia org wiki temperature pressure_and_volume_to_temperature 0 82 1 2 20 pressure_and_volume_to_temperature 8 2 5 3 60
def molarity_to_normality(nfactor: int, moles: float, volume: float) -> float:
    
    return round(float(moles / volume) * nfactor)


def moles_to_pressure(volume: float, moles: float, temperature: float) -> float:
    
    return round(float((moles * 0.0821 * temperature) / (volume)))


def moles_to_volume(pressure: float, moles: float, temperature: float) -> float:
    
    return round(float((moles * 0.0821 * temperature) / (pressure)))


def pressure_and_volume_to_temperature(
    pressure: float, moles: float, volume: float
) -> float:
    
    return round(float((pressure * volume) / (0.0821 * moles)))


if __name__ == "__main__":
    import doctest

    doctest.testmod()