0

I am not understand loop concept, can you explain me?

I am not understand for loop while loop how to use and how to work please explain me

17th Oct 2020, 2:55 PM
Vishal Kumar Bhagat
Vishal Kumar Bhagat - avatar
2 Respostas
+ 2
Vishal, loops are of two types, for loops and while loops. For loops are used for praying through a iterable(for example, lists, string, etc). While loops and used to loop through an unknown number. The unknown number depends on conditions. Hope you understood!
18th Oct 2020, 12:47 PM
Sean Santhosh
Sean Santhosh - avatar
0
Your task is to print the numbers 0 - 9. You could write out 10 print statements and call it a day. OR you could write a for loop to do it. Loops are about executing code that's in the loop a certain amount of times. So to print the numbers, you could try: for num in range(10): print(num) https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2281/
17th Oct 2020, 3:03 PM
Slick
Slick - avatar