The problem with what you were taught is that many foreign teachers of English, understand our language to be one of rigid rules, which must be absolutely followed.
That may be true regarding some specific grammatical constructions, but it is not always true. English is very flexible. As a Native Speaker, I can communicate in several ways, as follows:
(1) Yes, I have a pen. (2) Yes I do. (3) I do have a pen. (4) I have got a pen.
(5) Here is my pen.
(6) (I can simply hold my pen up for others to see, and wave it around.)
(7) I can offer a casual response, without even using a complete sentence.
One example is to simply answer back; "Yo!"
My point is that in English, I can do just about anything I want to do.
So can you.
You can say "Uh-Huh" to be affirmative to the Pencil Question or the Garbage question.
You can say simply, in answer to the question about taking out the garbage; "I did."
You can say, "I have." or "I have taken the garbage out."
You can say; "I did take the garbage out." or "It has been done." or, "I have done it."
English is very flexible.