I am requested to do a sum of the first fifty positive even numbers by using For loop.
The For loop that I created is
For[natNum = 2, natNum <= 50, natNum = natNum + 2, Print[natNum]]
The output of this is a list of numbers from 2 to 50 and they are increasing by 2. Now I need these numbers to be sum so I created
Sum[For[natNum = 2, natNum <= 50, natNum = natNum + 2, Print[natNum]]]
However, it is not a correct input. I am not sure if I should write the Sum inside the For loop.

Forloops are almost never a good way to do anything in Mathematica. – John Doty Mar 03 '19 at 20:32Total@Range[2, 2*50, 2]would be pretty direct. Note also thatPrintprints its arguments, but does not return them (in fact, it returnsNull). – MarcoB Mar 03 '19 at 22:57Forloop to compute50 * 51is a pretty bad idea.... – Henrik Schumacher Mar 03 '19 at 23:51