You will write a function that sorts a substance from three facts: how many kinds of atom it has, whether they are joined chemically, and whether they are in a fixed ratio. The program then sorts six substances.
The idea. An element has one kind of atom. A compound has two or more kinds, joined chemically in a fixed ratio. A mixture has two or more substances, not joined, in any ratio.
Your tasks.
"element"."compound"."mixture".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…