Hi! My code was:
#Write your function here
number_of_divbytens = []
def divisible_by_ten(nums):
for x in nums:
if x % 10 == 0:
number_of_divbytens.append(x)
return len(number_of_divbytens)
#Uncomment the line below when your function is done
print(divisible_by_ten([20, 25, 30, 35, 40]))
It returned 3, but the exercise kept telling me that it returned 6. I even added a couple more numbers at the end of the list to make sure that it was working properly. What’s wrong?