You will write three small functions that describe an atom and its nucleus.
The idea. The neutrons are the nucleon number minus the proton number . The overall charge is the protons minus the electrons. Two nuclides are isotopes when they have the same proton number and a different nucleon number.
Your tasks.
neutrons, return the number of neutrons.overall_charge, return the charge in units of the charge of a proton.is_isotope, return True when the two nuclides, each written (A, Z), are isotopes of one element.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…