I am combining a while-loop with an if-statement to add a number from 0-24 if the number is even. I constantly go to an infinite loop.
number = range(0,50)
i = 0
total = 0
while number[i]<25:
if number[i]%2==0:
total+=number[i]
i+=1
print(total)