The sentence you wrote is very close to being correct! Here's the sentence:
Hoopoes nest in tree holes and make them smell stinky to keep visitors away.
Let's check the grammar step by step:
- Subject and Verb: "Hoopoes nest" — this is correct. 'Hoopoes' is plural, and 'nest' is the verb. Good!
- Prepositional Phrase: "in tree holes" — this tells us where they nest. Correct.
- Conjunction: "and" — connects two ideas. Good.
- Verb Phrase: "make them smell stinky" — this means the hoopoes cause the holes to have a bad smell.
- Purpose: "to keep visitors away" — shows why they do it. Correct.
Grammar Note: The word "stinky" is informal and is okay for speaking and simple writing, but a better word would be "bad" or "smelly" to sound more formal. You could say "make them smell bad" or "make them smell smelly," though "make them smell bad" is more natural.
Improved sentence: Hoopoes nest in tree holes and make them smell bad to keep visitors away.
This sentence is grammatically correct and clear.