+ 2

Why While loops?

Hey guys, I came here to ask a question why while loops are so important to use.If you know please answer.

29th Jul 2017, 3:04 PM
Hrishikesh Nag
33 ответов
+ 3
something that loops as long as the condition is true, that means it will repeatedly check the condition over and over again . Also while loops has simpler codes (for me)
29th Jul 2017, 3:56 PM
josef soneja
josef soneja - avatar
+ 3
Oh this time I got it.
29th Jul 2017, 4:21 PM
Hrishikesh Nag
+ 2
Thanks Josef for the answer
29th Jul 2017, 4:00 PM
Hrishikesh Nag
+ 2
I understood loop.Loops are used to repeat certain things.
29th Jul 2017, 4:09 PM
Hrishikesh Nag
+ 2
well, while loops repeats from an unknown amount of time until the condition is met( the condition intially true, becoming false ), on the other hand, for loops repeats for a given amount( size of an Array, for example ). Sorry for the confusion
29th Jul 2017, 4:19 PM
josef soneja
josef soneja - avatar
+ 2
Thanks
29th Jul 2017, 4:21 PM
Hrishikesh Nag
+ 2
Do you think sololearn gives in-depth tutorial for Html.
29th Jul 2017, 4:27 PM
Hrishikesh Nag
+ 2
I'mma sleep now
29th Jul 2017, 4:30 PM
josef soneja
josef soneja - avatar
+ 2
12.31 am
29th Jul 2017, 4:33 PM
Hrishikesh Nag
+ 2
real example for while loop is: in game programming when a player tries to penetrate through wall while loop will stop him to cross it and when he takes another. direction it breaks.
29th Jul 2017, 9:18 PM
seelam suneel
seelam suneel - avatar
+ 1
do you understand do...while?
29th Jul 2017, 4:08 PM
josef soneja
josef soneja - avatar
+ 1
what is while?
29th Jul 2017, 4:09 PM
Hrishikesh Nag
+ 1
how about do...while loops?
29th Jul 2017, 4:10 PM
josef soneja
josef soneja - avatar
+ 1
ahah I didn't get it.
29th Jul 2017, 4:11 PM
Hrishikesh Nag
+ 1
do you understand it,then?
29th Jul 2017, 4:12 PM
josef soneja
josef soneja - avatar
+ 1
Too bad this app doesn't provide advance courses for python, java, or any language
29th Jul 2017, 4:29 PM
josef soneja
josef soneja - avatar
+ 1
Wow Seelam good example.
30th Jul 2017, 4:13 AM
Hrishikesh Nag
0
No.I didn't understood it it's little bit confusing.
29th Jul 2017, 4:13 PM
Hrishikesh Nag
0
How while loops are different from for loops?
29th Jul 2017, 4:14 PM
Hrishikesh Nag
0
I hope I didn't waste your time.
29th Jul 2017, 4:22 PM
Hrishikesh Nag