Write a sentence containing a gerund; identify the gerund by writing it in all CAPITALS. Then, tell how the gerund is used (subject, direct object, predicate noun, object of preposition).

Swimming in the ocean is my favorite hobby.

The gerund in this sentence is "SWIMMING."

In this sentence, the gerund "SWIMMING" is used as the subject. It is what the sentence is about; swimming is being identified as the speaker's favorite hobby.