You will write a function that fills the shells of an atom from its atomic number, for the first twenty elements. Then you will use it to find the outer electrons, and every atom that needs four shells.
The idea. Fill the shells from the inside: at most in K, then in L, in M, and the rest in N. Stop when no electrons are left.
Your tasks.
arrangement, put min(left, limit) electrons in each shell, and stop when none are left.outer, return the number of electrons in the outermost shell.four_shells, the list of atomic numbers from to whose atoms use four shells.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…