The molecular orbitals of a diatomic molecule are stored in a list, from the lowest energy up, with how many electrons each holds and whether it is bonding. You will write a function that fills them with a given number of electrons and returns the bond order.
The idea. Fill each level up to its capacity before moving on. Bonding electrons add to the bond, antibonding ones take away. The bond order is half the difference.
Your tasks.
bond_order(n): fill the levels with n electrons and return .orders to a dictionary of the bond orders of , , and , using their electrons.no_bond to the list of those names whose bond order is .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…