What does “TypeError: ‘float’ object cannot be interpreted as an integer” mean when using range?

In:

for i in range(c/10):

You’re creating a float as a result – to fix this use the int division operator:

for i in range(c // 10):

Leave a Comment