im stuck on “for i in loop” here is the code:
rangeLow = int(input("What is the lowest number you'd like to add? (inclusive) " ))
rangeHigh = int(input("What is the highest number you'd like to add? (exclusive) " ))
rangeSum = 0
while (rangeLow < 0):
print("My minimum is 0 - please try again.")
rangeLow = int(input("What is the lowest number you'd like to add? (inclusive) "))
while (rangeHigh > 1000):
print ("My maximum is 1000 - please try again.")
rangeHigh = int(input("What is the highest number you'd like to add? (exclusive) "))
if (rangeLow >= rangeHigh):
print ("The High number must be larger than Low number. I'll swap these for you.")
temp = rangeHigh
rangeHigh = rangeLow
rangeLow = temp
for i in loop(rangeHigh, rangeLow):
if (i % 2 == 0):
print(" Adding " + str(i) + " to the sum.")
rangeSum = rangeSum + i
elif (i > rangeHigh):
print ("My loop has gone past the High number! This shouldn't happen!")
print("The sum of the even numbers from [" + str(rangeLow) + "] to [" + str(rangeHigh) + "] is: " + str(rangeSum))