Computer Science, asked by utsavnishu, 9 months ago

wap in
python to find the sum of the first ten natural
numbers using the 'for' loop​

Answers

Answered by bktbunu
2

Explanation:

sum=0

for i in range(1,11):

sum+=i

print("The sum of first 10 natural numbers is: ",sum)

Answered by Anonymous
1

Answer:

hi...

Explanation:

sum=0

for i in range(1,11,1):

   sum+=i

print(sum)

   

->here you can see that the start value is 1

->end value i have taken as 11 because you have to calculate for first 10 numbers and you maybe knowing that here end value will be taken as end value-1

->and the step value has been selected as 1..

#hope it helps you

please mark brainliest

Similar questions