Internal-combustion engine is a device in which the burning of a mixture of fuel and air produces mechanical energy to perform useful work. The combustion (burning) of the mixture creates hot gases that push against turbine blades or against one or more pistons or rotors. Each blade, piston, or rotor is connected to an output shaft. This shaft rotates, transferring the mechanical energy to another location to perform useful work. Internal-combustion engines include gas-turbine, diesel, and both piston-type and rotary gasoline engines. In external-combustion engines, including steam engines, the hot gases transfer heat energy to another fluid. This fluid, in turn, pushes against turbine blades or other moving parts.