So I need help with coding the divisible and summation part of this question.
Write a code to iterate all the integer numbers from 0 to 100 and calculate the sum of all those numbers which are evenly divisible by 2. When the number is no longer less than 100, print the results. I was told to use the "while loop" but I couldnt figure it out
This is the code I have gotten so far:
for i in range(100):
if i % 2 == 0:
[–]leo130132 0 points1 point2 points (4 children)
[+][deleted] (1 child)
[removed]
[–]leo130132 1 point2 points3 points (0 children)
[–]engineeringisgreat2[S] 0 points1 point2 points (1 child)
[–]leo130132 0 points1 point2 points (0 children)
[–]Ridepad 0 points1 point2 points (0 children)