Skip to main content
Solved

calculate average with for loop

  • Feb 20, 2020 12:42 PM UTC
  • 2 replies
  • 57 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?

View original
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
Evangelist
Forum|alt.badge.img+54
  • Evangelist
  • Best Answer
  • Feb 20, 2020 12:48 PM UTC

Why not use the cumulative port on the Statistics Calculator?


Forum|alt.badge.img
  • Author
  • Feb 20, 2020 1:12 PM UTC

Why not use the cumulative port on the Statistics Calculator?

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