+ 2
I read the theory in Sololear about cycles, and I did not understand at all what was "for". Explain as clearly as possible pleas
е.🙏
2 Antworten
+ 3
A for loop executes the code inside it's curly brackets until it reaches the stop condition.
For example if you want to loop 10 times:
for x in range(9):
// do something
+ 1
Can add the sentences which you not understood..?
Cycle means there is iterations..
Ex :
for i in range(10) :
#for loop statements . These executed 0 to 9(10-1), total in 10 times repeatedly...
Ex:
for i in range(5) :
print(i)
#output
0
1
2
3
4
https://www.sololearn.com/discuss/1702479/?ref=app
https://www.sololearn.com/discuss/1750081/?ref=app.