The statement that "there is no force of attraction between the molecules of a gas" is not correct.
If this statement is true, the gas should never liquefy. However, we know that gases do liquefy when cooled and compressed.
It is impossible to liquefy an ideal gas since ideal gas has no force of attraction between the gaseous molecules.