i and rings are integers.

float(i) converts i to float, so that float(i) / rings will be performed using floating point division rather than integer division.

  • Byl replied to this.

    Compare that code to the code in your first post. Do you see the difference?

    • Byl replied to this.