Final answer:
The truck coasting up the hill with its engine turned off is obeying the principle of conservation of mechanical energy because the kinetic energy is converted into gravitational potential energy without external work, while the sports car with the running engine is not conserving mechanical energy since it is adding energy to the system.
Step-by-step explanation:
The principle of conservation of mechanical energy states that the total mechanical energy in a system remains constant if only conservative forces are doing work. When friction and air resistance are ignored, as requested, the truck that coasts up the hill with the engine turned off obeys this principle because its initial kinetic energy is converted into gravitational potential energy without any external work being done on or by the system. On the other hand, the sports car with its engine running is continually adding energy to the system to maintain a constant speed up the hill, which means it is not conserving mechanical energy as in the first case.