I can't understand | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

I can't understand

Loop defination or How it works? Can someone tell. Me I will be so thankful to Him

7th Apr 2020, 3:01 PM
Kaushal Gunawat
Kaushal Gunawat - avatar
3 Answers
7th Apr 2020, 5:12 PM
Pete Cowling
Pete Cowling - avatar
+ 1
Loops are used to execute statements multiple times. Example: for i in range(0,5): print(i) Explanation: A loop is defined with the for or while keywords. The 'i' in this case will hold the value given by "range(0,5)"(this produces values from 0 till 5-1). The loop will keep on going and printing i as long as "range..." still has values to give. It is all explained in the python tutorial.
7th Apr 2020, 5:14 PM
Mensch
Mensch - avatar
0
Thank you
19th May 2020, 1:23 AM
Kaushal Gunawat
Kaushal Gunawat - avatar