Does attitude determine success and failure in an endeavor?Any examples from literature or history to explain would be helpful
It would be very difficult to argue that attitude is the sole, or even the main, determinant of success or failure. There are too many other factors that can have an impact on what happens in things like war or social movements, or other historical events.
Perhaps the most obvious example of this is in war. In WWII, the Axis had the "better" attitude at the start of the war. They were doing well and were very motivated to continue. Their morale and attitudes were good. However, that was not enough to make them win the war. They were defeated because of other factors, most important of which was the size and industrial strength of the United States.
So, attitude can certainly have an influence on history, but they cannot determine success or failure.