A diatomic gas goes from A (, ) to B (, ) along three different paths. You will make the program find the work along each path from the area under it, the change of internal energy, and the heat each path needs.
The idea. Along a straight piece the work is the average pressure times ; a path's work is the sum over its pieces. For a diatomic ideal gas , so is the same for every path. Then .
Your tasks.
work(path): add up the work of each straight piece of the path.dU, the change of internal energy from A to B.Q for each path.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…