Why do gases exert pressure on the walls of the container?

Why do gases exert pressure on the walls of the container?

Because gases have a tendency to escape or the intermolecular force of attraction between the gaseous molecules are negligible thats why gases exert pressure on the walls of the container.