Every compound has a fixed composition by mass. You will find the molar mass of ammonium phosphate, a fertiliser, from its formula, then the mass percent of each element, and the element with the largest share.
The idea. The molar mass adds up atomic mass times count for every element. The mass percent of an element is its atomic mass times its count, divided by the molar mass, times .
Your tasks.
molar_mass, return the molar mass of a formula given as a dictionary.percent with the mass percent of each element.largest to the element with the largest mass percent.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…
With Standard, you also open 12 more problems, 2 Python labs and 1 extra course. Everything you have used here stays free, always.