Why is gunpowder unprofitable to use as fuel, while gasoline cannot replace gunpowder in artillery pieces?

Gunpowder differs from gasoline in that it contains an oxidizing agent and is capable of burning without oxygen. Gunpowder burns quietly in the open air and explodes when ignited in closed spaces under conditions of rapidly increasing pressure.

In engines, gunpowder cannot be used, because it is difficult to dose it and feed it into the engine cylinders with high frequency. The increased detonation capacity further complicates this task. Gunpowder is used only in rocket jet engines.

Gasoline cannot be used as a substitute for gunpowder, because it cannot burn in the bore without oxygen.

One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.