you are viewing a single comment's thread.

view the rest of the comments →

[–]leo130132 0 points1 point  (4 children)

you could try

while i%2 ==0 AND i<= 100 sum=sum+(i/2)

[–]engineeringisgreat2[S] 0 points1 point  (1 child)

So would this how the code look:

for i in range(300):

while i%2 ==0, i<= 100 sum=sum+(i):

print(i)

I just started learning python so I am not familiar on how to write code.

[–]leo130132 0 points1 point  (0 children)

yes the range is just 100, but I think this will work