# day-5-3-exercise

Not run yet
This repl has no cover image
Details
Created on Oct 28, 2020
Forked from
This repl has no description
13 Reactions
to comment
ninjahanderson7 days ago

#Write your code below this row 👇

cum_sum = 0

for number in range(100):

``````isEven = True if (number + 1) % 2 == 0 else False

if isEven:

cum_sum += number + 1``````

print(cum_sum)

aminfazl13721 week ago

s=0

for i in range(2,101,2):

``s+=i``

print(f"The sum of even numbers from 2 to 100 is equal to: {s}")

obgyneKenobi212 weeks ago

even = 0

for count in range(1, 100, 2): even+=countprint(even)

rachid882 weeks ago

even_numbers_sum = 0

for number in range(1 , 100 , 2):

even_numbers_sum += number

print("voila, the sum of even numbers between 1 and 100 is:" +

f"{even_numbers_sum}")

manikarthikclt3 weeks ago

sum_of_evens = 0for evens in range (1,101): if evens % 2 ==0: sum_of_evens += evensprint(sum_of_evens)

or

sum_of_evens = 0for evens in range (2,101,2):

sum_of_evens += evensprint(sum_of_evens)

DenM763 weeks ago

even_sum = 0for number in range(0,101,2): even_sum += number

print(even_sum)

Eldaube4 weeks ago

total_even = 0

for nb in range(1, 101):

if nb % 2 == 0:

``total_even += nb``

print(total_even)

testtemptest4 weeks ago

😍

AnastasiiaVysh4 weeks ago

sum_even = 0

for number in range(2, 101, 2):

sum_even += number

print(f"The sum of all even numbers from 1 to 100 is — {sum_even}")

FrozenChicken1 month ago

total= 0for sum in range(2,101,2): total+= sumprint(total)

Forks
day-5-3-exercise
day-5-3-exercise
day-5-3-exercise
day-5-3-exercise
day-5-3-exercise-1