Need some help with my coding

 

Hello,

i have a problem with the for statement. iv put it in a function before the start(), but id like to return every value of the iteration. it only returns the result of the entry in the iteration i.e, if i would like it to run 7 times, it only gives me the result of the 7th time it loops, yet id like to return a result for every time I loop. is there a way to get the result?

thank you

 

Can you code part of your code as an example and what your objective is?

It will be easier to figure out what's wrong.

 

I could help you but without the code it's hard to answer your question. Please post part of your code (at least this one function before start)

 
nduru22:
Hello,

i have a problem with the for statement. iv put it in a function before the start(), but id like to return every value of the iteration. it only returns the result of the entry in the iteration i.e, if i would like it to run 7 times, it only gives me the result of the 7th time it loops, yet id like to return a result for every time I loop. is there a way to get the result?

thank you

Why don't you simply save a value of every iteration into a an array?

That way you would have all the values stored into an array that you can access at any time you need it in the code following that for loop

Reason: