how to calculate the average of first n odd number in python? with example
wrong answer will be reported
Answers
Answered by
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
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
Hindi,
2 days ago
Math,
5 days ago
Social Sciences,
5 days ago
Science,
8 months ago
English,
8 months ago