Computer Science, asked by shahanab4327, 10 months ago

Python program to find sum of n natural numbers using for loop

Answers

Answered by Anonymous
8

Answer:

\large\mathbb{\underbrace\purple{ANSWER}}

The program accepts user input using the input function. Next, run loop till the entered number using the for loop and range() function. Next, calculate the sum using a sum = sum + current number formula. At last, after the loop ends, calculate the average using average = sum / n .

MARK AS BRAINLIEST

Answered by Amina80
6

  \huge\boxed{ \fcolorbox{pink}{blue}{Answer ⤵}}

  • The program accepts user input using the input function. Next, run loop till the entered number using the for loop and range() function. Next, calculate the sum using a sum = sum + current number formula. At last, after the loop ends, calculate the average using average = sum / n .
Similar questions