Programming homework is more satisfying because you just created something. It's like painting or writing.
In a lot of ways, it's art. You go through such a wide range of emotions and experiences as you finish a program.
I once spent two weeks writing a program, and I was working on it everyday for hours at a time. The final few days were non-stop working. I got furious, frustrated, angry, I felt elation followed by crushing despair, and at the very end, I had this immense feeling of satisfaction, followed by weariness. And when I beheld my creation, I knew that this was something born from me and me alone, that it was a culmination of what I had learned and experienced, and had someone else made it, their experiences would be different, yet relatable.
Programming is art. It's most elegant algorithms and code are often representative of it's creator's mind.