Gunpowder's burning rate increases with pressure, so it will burst containers but just burns in the open. Ignition of the powder packed behind a bullet must generate enough pressure to force it from the muzzle at high speed, but not enough to rupture the gun barrel.
The gas constant occurs in the ideal gas law, as follows: where P is the absolute pressure (SI unit pascals), V is the volume of gas (SI unit cubic metres), n is the amount of gas (SI unit moles), m is the mass (SI unit kilograms) contained in V, and T is the thermodynamic temperature (SI unit kelvins).
Let's go over those steps for using the Ideal Gas Law to calculate the molar mass of the gas: 1) You have to know the grams of gas involved. Usually the problem will just give you the value, but not always. You might have to calculate it. 2) You are going to have to calculate the moles of gas. Use PV = nRT and solve for n.