“Metals and Non-metals: Python Challenge Lab” is available to Standard subscribers.
A reactivity series is a list. An ore calculation is a few lines of arithmetic. In this course you turn the chemistry of metals into short Python programs, and you use them to test ideas: which metals displace which, which ore is the richest, and how much alloy you need. Then you take a timed test in the style of an olympiad.
3Lessons6Problems3Python Labs1Question Set1Mock Test
Coding the reactivity series: The reactivity series is a list in order, from potassium at the top to gold at the bottom. A metal displaces another from a solution of its salt if it is earlier in the list. A program can hold the series as a list, use the index of a metal as its place, and test the rule with index comparison. A model is tested against known results, and it has limits. Potassium, sodium and calcium react with the water of the solution first, and the model says only if a reaction happens, not how fast.
Coding ores, yields and alloys: The share of a metal in a compound is the mass of the metal in the formula divided by the mass of the whole formula, as 70 percent iron in haematite Fe2O3. The metal from an ore is the mass of the ore times its purity times the share of the metal. To change the share of a metal in an alloy by adding more of it, write the new share as an equation in x, the mass that is added. A program can do these sums for many ores at once. Always check that the masses add up, that a share is never above 100 percent, and that the units are not mixed up.
Coding the extraction route: How a metal is extracted depends on its place in the reactivity series: electrolysis for the most reactive, reduction with carbon for the middle, heating for the least. The ore decides the first step: roasting a sulphide, calcining a carbonate. Both rules fit in a short program.
The chapter itself stays free
This is an extra course for Metals and Non-metals. Its main courses are open to everyone: