Skip to main content
Best Answer

calculate average with for loop

  • February 20, 2020
  • 2 replies
  • 22 views

Forum|alt.badge.img

Hello!

I have point next to each other with a slope value between two neighbor points. Now I want to average these values with a loop, like:

for n in range(num):
    numbers = float(input('Enter number : '))
    total_sum += numbersavg = total_sum/num

Can you help me to put it in practice with FME

Best answer by ebygomm

Why not use the cumulative port on the Statistics Calculator?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • Best Answer
  • February 20, 2020

Why not use the cumulative port on the Statistics Calculator?


Forum|alt.badge.img
  • Author
  • February 20, 2020

Why not use the cumulative port on the Statistics Calculator?

Oh, thanks! I was sooo narrow-minded with python :)