# Question 1
total = 0

starting = int(input("Enter the starting number: "))
ending = int(input("Enter the ending number: "))

for count in range (starting, ending):
    total = total + count
    
print("The sum is", total)

# Question 2
total = 0

starting = int(input("Enter the starting number: "))
ending = int(input("Enter the ending number: "))

count = starting

while (count < ending):
    total = total + count
    count = count + 1

print("The sum is", total)
