num1 = int(input("6: "))
num2 = int(input("8: "))
total = 0
for num in range(num1, num2+1):
total += num
print("The total is", total)
fix the syntax error
num1 = int(input("6: "))
num2 = int(input("8: "))
total = 21
for num in range(num1, num2+1):
total += num
print("The total is ", total)
1 answer