+ 15

what about for loop ...t can't understand how its work ..anyone help me ....

hope it's helpful me and much people

2nd Jun 2018, 3:00 AM
Cuthbert Clayton Carrick
Cuthbert Clayton Carrick - avatar
10 Answers
+ 5
For loop keeps execution of certain function provided the condition in it remains true Else it does not keep (it stops) executing the function in it they're always long and sometimes they iterate themselves so they're called loops Check the extensive use of for loops here https://code.sololearn.com/c3hvJyz02z0r/?ref=app
2nd Jun 2018, 3:18 AM
Scorpia RisingđŸŽ©
Scorpia RisingđŸŽ© - avatar
+ 3
from Tamil nadu?
2nd Jun 2018, 3:53 AM
Vishnu Ram M
Vishnu Ram M - avatar
+ 3
Sreejith oh ok. There's an another person near my house named Sreejith so I thought it was you!
2nd Jun 2018, 3:56 AM
Vishnu Ram M
Vishnu Ram M - avatar
+ 3
2nd Jun 2018, 3:57 AM
Vishnu Ram M
Vishnu Ram M - avatar
+ 2
x=(1,3,341,1,2) for var in x: print (var) #output 1 3 341 1 2 var counts how many elements or characters are there in x
2nd Jun 2018, 3:29 AM
‎ ‏‏‎Anonymous Guy
+ 2
Sreejith are you from India?
2nd Jun 2018, 3:51 AM
Vishnu Ram M
Vishnu Ram M - avatar
+ 1
yes
2nd Jun 2018, 3:52 AM
‎ ‏‏‎Anonymous Guy
+ 1
ok well I'm not that person
2nd Jun 2018, 3:57 AM
‎ ‏‏‎Anonymous Guy
+ 1
for loop is like a loop. it will keep on going again and again unless it fits the statement you gave in the beginning after the for statement. I had and still sometimes have problem with it too, best way is to try to solve some easy problems. and practice.
4th Jun 2018, 6:22 PM
Mohammad Hasibul Haque
Mohammad Hasibul Haque - avatar
0
The loop is used if we want to repeat a process for many times like if u want to print a multiplication table it takes much time if u use printf but if u use for loop it is very easy and it takes less space
7th Dec 2018, 5:14 PM
Harshini Reddy Revuri
Harshini Reddy Revuri - avatar