Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
Ammonium sulphate, (NH4)2SO4, is a fertiliser. Use the reader with brackets to count its atoms, and find its molar mass and the mass percent of nitrogen. Use H , N , O and S .
Molar mass the sum of atomic mass times count for every element. In Python: sum(atomic[el] * n for el, n in counts.items()). A formula is read into symbols and counts with re.findall(r"([A-Z][a-z]?)(\d*)", formula), after brackets are opened. Mass percent .
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.
Step 1. Counts. {'N': 2, 'H': 8, 'S': 1, 'O': 4}.
Step 2. Molar mass. g/mol.
Step 3. Nitrogen. .
Answer: g/mol and nitrogen.
Log in to join the discussion.
Loading…