F
forum
Hi!
what's the standard way for a "for" loop with float increments?
Anton
what's the standard way for a "for" loop with float increments?
Anton
what's the standard way for a "for" loop with float increments?
Hi!
what's the standard way for a "for" loop with float increments?
Use a while loop instead:
f = initial_value
while f <= final_value:
process(f)
f = f + increment
Note that there is no general guarantee that f will actually be
final_value; see also <http://docs.python.org/tut/node16.html>.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.