Attempted to access index 50 from array with length 50!

So how would i go about fixing this? I understand the concept of inclusive now that you mentioned it although im not sure how to fix it