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)

num1 = int(input("6: "))

num2 = int(input("8: "))

total = 0

for num in range(num1, num2+1):
total += num

print("The total is", total)