Sum even numbers from 1 to 100

I need help with this assignment. I'm very new to using UNIX/LINUX, and my only previous experience with programing anything is using python.

We are writing scripts using vim, and this one I'm stumped on.

"Write a shell script that finds and display the sum of even positive integers from 0 to 100. Use the while control structure. Show your script and a sample run.

Example: Sum of 0+2+4+6+8+10+12+14............+96+98+100 . "

I can find examples of listing even and odd numbers, but everything else I seem to find is adding numbers from an input from the user, but I want to add the numbers together from a range of {1..100} .
Any help would be greatly appreciated.

It would be nice to see what you have so far!

I have erased and restarted so many times out of frustration what I have I know is nowhere close to what I'm looking for.

i=1
sum=0

for n in {1..100}
do
        out$=(( $n % 2))
        while [ $out -eq 0]
        do
        sum=$((sum + $n))
        i=$((i + 1))
done

So the idea is I'm taking the numbers from this list: {0..100}

and I only want the ones that are even:

(( $n % 2))

Take those even numbers and print out them all out, adding them together like:
" 2+4+6+8.....+98+100 "

There is a third argument to the for statement, and that is the step.
The for statement provides for incrementing "n"

Please wrap your code in code tags!
If you replace the while-do-done with an if-then-fi it makes sense: "if the remainder is zero then sum up"

...
  if [ $out -eq 0]
  then
    sum=$((sum + $n))
    i=$((i + 1))
  fi
...

Do not post homework / classworkquestions in the open fora. We have a special forum for those. Please fill in the entire form.

I guess - as this is an exercise for writing while loops - you can't adapt the Gaussian Sum Formula ( n(n+1)/2 )?