Both English learners and native English speakers get confused with affect and effect. So what’s the difference?

Affect is a verb meaning ‘influence or cause someone or something to change’.
Example: The pollution in the city has affected my health.

Effect is a noun meaning ‘the result of an influence’.
Example: The pollution in the city has a bad effect on me.

Can you put both affect and effect in a sentence?