Worked solution from the States of matter MCQ booklet.
A gas behaves least like an ideal gas when it has strong forces between molecules, or is close to condensing.
Krypton and fluorine have only weak London forces. Ammonia has hydrogen bonds, but at 150 °C it is well above its boiling point.
Steam at 150 °C is only about 50 °C above its boiling point and has hydrogen bonds, so it is very close to condensing and deviates the most.
So the answer is D.
A is a gas with hydrogen bonding but is far above its boiling point. B and C have only weak forces.
▶ Starts at Q7 (18:41)
Starts at Q7 (18:41) · by Lucid Mind. Tap the picture to open it on YouTube.
Solutions follow the official Cambridge mark schemes. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.