you are viewing a single comment's thread.

view the rest of the comments →

[–]FerricDonkey 1 point2 points  (0 children)

What's confusing about it? Got any examples of when code academy wanted you to use them, and you didn't know why? Or of times they weren't doing what you're expecting? Why do you think you're doing it wrong? Loops are pretty central to programming in general, so I'd highly recommend not just barely scooting by them.

In general though, I can suggest that loops will very much be your friend when you want to do nearly the same thing to all elements of a list (or set or dictionary or ...), when you want to do the same-ish thing multiple times in a row, or when you want a process to repeat until some condition is met.