TypeError: 'float' object not iterable TypeError: 'float' object not iterable python-3.x python-3.x

TypeError: 'float' object not iterable


for i in count: means for i in 7:, which won't work. The bit after the in should be of an iterable type, not a number. Try this:

for i in range(count):


use

range(count)

int and float are not iterable