Question: Here is one sentence: His display of foulness deserved severe punishment.
Here is another sentence: He understood the foulness of sin.
Does the foulness mean the same thing in the two sentences?

Answer: the same meaning

Question: Here is one sentence: The soldiers were put on fatigue to teach them a lesson.
Here is another sentence: They were assigned to kitchen fatigues.
Does the fatigue mean the same thing in the two sentences?

Answer: the same meaning

Question: Here is one sentence: The automobile reduced the demand for buggywhips.
Here is another sentence: His demands for attention were unceasing.
Does the demand mean the same thing in the two sentences?

Answer: different meanings

Question: Here is one sentence: He sailed around the world.
Here is another sentence: All the world loves a lover.
Does the world mean the same thing in the two sentences?

Answer:
different meanings