Moving average coding in python
Answers
Answered by
0
Explanation:
use sum() to calculate moving averages
Iterate through the original list using a while loop. At each iteration, use list indexing to obtain the current window. Use the syntax sum(iterable) / window_size with iterable as the current window to find its average. append this result to the list of moving averages
Similar questions