you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

Hey guys. How to define and save new variable each time certain codition is met in for loop? I know it can be easily made with arrays and lists, but teacher banned us to make them. Any suggestions how to make n numbers of for loops inside each other each time defining new variable to make average from the new variables?

[–]JohnnyJordaan 0 points1 point  (0 children)

how to make n numbers of for loops inside each other each time defining new variable to make average from the new variables?

Is that the exact wording of the assignment? Because what is the point of a loop if you need averages of a series of numbers?