It depends most on the temperature of the gas.
Density = Mass/Volume
So, given mass = 20 g and volume = 40 cm^3
By substituting in above equation, Density = 20/40 = 0.5 g/cm^3
Hope it helps.
Answer: energy transformation
If energy could<span> be created or </span>destroyed<span>, all of our ideas of how the world works ... Historically, of course </span>not<span> all the forms of energy were known to begin with. ... too messy or complicated to make sense, we </span>would have<span> had to give up the law. ... </span>can<span> be converted into rest </span>mass<span> and back again (particle physicists </span>do<span> this </span><span>every )</span>
Wein’s Law, search it up if you need more info