Problem 5-87

Diatomic compounds can be memorized with the following sentence:

"I Have No Bright Or Clever Friends"

I2, H2, N2, Br2, O2, Cl2 and F2.

solution Chap 5 # 87

To identify the diatomic gas, starts with any amount of chemical. 1 mole is a nice amount!
In this case, the volume at STP of this sample is 22.42 L.
From the density equation, the mass corresponding to this volume can be found.

ρ = mass gas  
volume

3.164 g/L = mass gas  
22.42 L

Knowing both the mass and the number of moles (here 1 mole), the molar mass of the gas can be calculated and the gas can be identified.