Disclaimer: This post may contain blanket statements not suitable for literalists.
If I have a good attitude, my algebra takes less than an hour. If I don't, then it can take 3-4 hours (Yeah, I know, it's bad).
Sometimes I will do all of the easy problems, and then the hard ones, because it feels like I am making good progress, and my attitude improves. If I get stuck on a hard problem toward the beginning, then it feels like I am making no progress. When my good attitude decreases, so does my motivation to work.
Some people, after making a mistake/something bad happens to them, they get depressed. Then their motivation to live drops proportionately to their attitude toward life, and they kill themselves. :(
If someone strives to be cheerful all the time, then their bread sometimes lands butter-side-up, they see the light at the end of the tunnel, and their attitude toward life is better. They also don't end up committing suicide as quick.
A cheerful attitude is absorbed slowly, but a bad attitude is quite contagious.
Spread the cheer; be happy. :D