You will write four functions that answer most questions on cubic cells. One gives the number of atoms in a cell. One gives the radius of an atom from the edge. One gives the packing efficiency. One gives the density.
The idea. A simple cubic cell holds 1 atom, bcc holds 2 and fcc holds 4. The contact rules are , and . The packing efficiency is , and the density is with in cm.
Your tasks.
atoms_per_cell(kind) for "sc", "bcc" and "fcc".radius(kind, a) so that it returns the radius in pm from the edge in pm.packing(kind) so that it returns the fraction of the cell that the atoms fill. Use any edge you like.density(kind, M, a) so that it returns the density in g/cm³, with M in g/mol and a in pm.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…