Computer Science, asked by mahalakshmianu9, 5 days ago

how to calculate the average of first n odd number in python? with example

wrong answer will be reported ​

Answers

Answered by darp2722
1

Answer:

Inside a loop, calculate the sum of n odd numbers using a sum = sum + current number formula with (not (num % 2) == 0). Next, calculate the average of n odd numbers. After the loop ends, print the sum variable that contains the sum of n odd numbers.

example in attachment

hope it helps you dear

good night and sweet dreams!

Attachments:
Answered by medha1811
0

Explanation:

Inside a loop, calculate the sum of n odd numbers using a sum = sum + current number formula with (not (num % 2) == 0). Next, calculate the average of n odd numbers. After the loop ends, print the sum variable that contains the sum of n odd numbers.

Similar questions