You will write three small functions. They decide the state of a substance at a given temperature and name a change of state. The temperatures are in degrees Celsius.
The idea. Below the melting point a substance is a solid. From the melting point up to the boiling point it is a liquid. At the boiling point and above it is a gas.
Your tasks.
state, return "solid", "liquid" or "gas" for a temperature temp, a melting point melting and a boiling point boiling.states_at, return a dictionary of the state of every substance in data at the temperature temp.change, return the name of the change of state from before to after: "melting", "freezing", "boiling", "condensation" or "no change".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…