I have been asked what the average value of the sin x for the interval greater or equal to 0 and less than or equal to 2 pi. I just plugged in the two end values and since both are = 0 the answer is, of course, 0.

Then I was asked what the average value of this is between 0 and pi

Obviously I am doing something wrong because the answer is 2/pi!!! Please advise on how to do these correctly. Thank you very much