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)
| 8 | |
| 9 | |
| 10 | def 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 | |
| 26 | def moles_to_pressure(volume: float, moles: float, temperature: float) -> float: |
nothing calls this directly
no outgoing calls
no test coverage detected