MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / molarity_to_normality

Function molarity_to_normality

conversions/molecular_chemistry.py:10–23  ·  view source on GitHub ↗

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 >>> molar

(nfactor: int, moles: float, volume: float)

Source from the content-addressed store, hash-verified

8
9
10def molarity_to_normality(nfactor: int, moles: float, volume: float) -> float:
11 """
12 Convert molarity to normality.
13 Volume is taken in litres.
14
15 Wikipedia reference: https://en.wikipedia.org/wiki/Equivalent_concentration
16 Wikipedia reference: https://en.wikipedia.org/wiki/Molar_concentration
17
18 >>> molarity_to_normality(2, 3.1, 0.31)
19 20
20 >>> molarity_to_normality(4, 11.4, 5.7)
21 8
22 """
23 return round(float(moles / volume) * nfactor)
24
25
26def moles_to_pressure(volume: float, moles: float, temperature: float) -> float:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected