0
For loop and while loop
Can someone teach me how to while loop and for looo?
7 ответов
+ 3
just write code and test it ... 😅
+ 2
You will use loops in virtually every code you ever write, so really everything will become a practice.
Go for the most simple coding challenges, either from here or on sites like project euler or hacker rank, and while you try to find the solution, you'll naturally come to think:
Hey, I'm gonna need a loop here!
+ 2
Go on with it - it's one of the few things that become even more fun, the more you learn about it. 🙂
+ 1
do the tutorial of sololearn ...
otherwise:
while condition:
repeat the entended code here
for i in iteratable:
repeat the entended code here
and i will be equal to a certain
element of the iteratable
+ 1
thanks man will do, just ive been finding this stuff really interesting ive never been a code guy but its kinds fun
0
do you know anywhere on here or anywhere else that I can practice this
0
okay I guess I just wanted some more practice casue im currently taking a scripting class right now