Iterations were not integers

If the variable 'time' was a float the variable 'iterations' would also be a float. I did a cast from float to int to prevent problems from happening with the function 'range'.