You will write three small functions about metal ores.
The idea. The grade of an ore is the percentage of metal in it. Metal = ore × grade ÷ 100, and the rest is waste rock.
Your tasks.
metal, return the tonnes of metal in ore tonnes of ore of grade grade %.waste, return the tonnes of waste rock left over.richest, the dictionary ores holds ore names and grades. Return the name of the ore with the highest grade.Run your code once to unlock the worked solution.
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…