21 sum of n natural numbers using for loop in python-vlr training

Subscribe http://www.goo.gl/6V400m

The range() function is especially useful in combination with the for loop, as we can see in the

following example. The range() function supplies the numbers from 1 to 100 for the for loop to

calculate the sum of these numbers:

n=100
sum=0
for x in range(1,n+1):
sum=sum+x
print(“sum of 1 to ” ,n, “is” ,sum)

———-
for loop
for variable in sequence :
statements
else:
statements

Html & Css Training videos in Telugu
https://goo.gl/Srithp
JavaScript Training Videos in Telugu
https://goo.gl/7Id05K
JQuery Training Videos in Telugu
https://goo.gl/Ad7y6c
HTML5 Training videos In Telugu
https://goo.gl/V1wbCX
AngularJS Training Videos In Telugu
https://goo.gl/jyfPYz
Sql tutorials in telugu
https://goo.gl/h6c8Js
R Language Training Videos telugu
https://goo.gl/GfmIvS
Blogger Training Videos telugu
https://goo.gl/pejxke
Wordpress training Videos telugu
https://goo.gl/ktZ1Es
Digital marketing training videos in Teluguz
https://goo.gl/0wdXl1
Php training videos in Telugu
https://goo.gl/PkbU38
c plus plus training videos in telugu
https://goo.gl/l2pWh5
seo training videos in telugu
https://goo.gl/nP9aGn
All Videos In Telugu
https://goo.gl/WQXmcB

source