system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does a pressure cooker work? How does it cook the food faster and why the whistle?
gpt
When you bake cookies in an oven, a recipe specifies a certain temperature. But when you boil pasta, recipes only specify lengths of time, and those change depending on elevation. This is because substances undergoing phase transitions (with boiling, water is changing from a liquid to a gas) are restricted to one temperature. No matter how high or low you turn your stove, boiling water will remain at the boiling point. The boiling temperature, however,  changes with the pressure. At higher pressure, water molecules are pushed together more and they can't "escape" their mutual attractions to become a gas as easily, so the boiling point is pushed to a higher temperature. Inside a pressure cooker, the water is able to reach a higher temperature. This cooks the food faster. The whistle is a pressure valve to keep the pressure inside the pressure cooker from reaching an unsafe level and turning it into a bomb.