Here's why:
* Transitive verbs require a direct object. The direct object receives the action of the verb.
* In this sentence, "learned" is the verb, and "the code" is the direct object. Rhonda and Greg are performing the action of learning, and "the code" is what they are learning.
Let me know if you'd like more examples or explanations!