The relation between γ(ratio of specific heats) and degree of freedom f is
γ=1+2f..........(1)
γ=cpcv
γ=1.4
Put this in equation (1)
1.4−1=2f
0.4=2f
f=5
So the degree of freedom of the gas is 5. Hence, the gas is diatomic.