I don't understand why the code is causing errors. For example, the error says that you can't add an integer and a string together, but I've already converted the string to an Integer. Could you help me fix it? The code is attached. Thanks.

```
# In this program I will collect data
# values from the user and use python built-in functions
# to display various info about the data set

# Giving user directions

print("In this programme, you can enter")
print("some numbers and it will display the")
print("minimum, maximum, range and average")
print("of the data set you entered.")

# Setup

list = []
loop = True

# Creating function for process of entering number

def enterNumber():
    print()
    x = input("Enter an integer: ")
    y = str.isdigit(x)
    if y == True:
        list.append(x)
        print()
        print("Successfully added to list")
        print()
        print("Here is your list so far")
        print(list)
    elif y == False:
        print()
        print("Sorry, this is not an integer")
    else:
        print("Error. Kill and start again")

while loop == True:
    enterNumber()
    print()
    print("Would you like to add another value?")
    print()
    a = input("Enter 1 for Yes, enter 0 for No: ")
    if a == "0":
        loop = False

print()
print()
print("------------------------------------------------")
print()
print("Count:", len(list))
print()
print("Minimum:", min(list))
print()
print("Maximum:", max(list))
print()
print("Range:", int(max(list)) - int(min(list)))
print()
print("Average:", int(sum(list)) / int(len(list)))

```

It seems like this last line is the problem.