Iteration

Running a statement through code until it's true. The first video talked about running a statement through code until it's true

I = 1
while I < 5:
    print(I)
    I += 1
1
2
3
4

It was talking about a statement going through a condition until it's true

The videos use a fake coding language that doesn't really have a 1:1 translation to python or javascript. The other two videos were talking about REPEAT functions and REPEAT UNTIL functions. The repeat function will repeat a function a set number of times and the repeat until is basically a while function

list = [1, 2, 3, 4]
for n in list:
    print("i")
i
i
i
i

You can emulate a repeat function using a for loop, like I did above. It'll loop for each item in the list, so you can plug in a list that has the same amount of items as you want loops.

Lists

The first video talks about for loops to loop through a list. They also list some code you can apply to lists

list = [1, 2, 3]
print(list)
print(list[2])
list.append(4) #add a variable to the end of the list
print(list)
list.pop(1) #remove the variable at a chosen index
print(list)
list.insert(1, 2) #insert a variable in a specified spot. Index first, then desired variable 
print(list)
x = list[1] #make x into the variable at index 1
print(x)
print(len(list))
[1, 2, 3]
3
[1, 2, 3, 4]
[1, 3, 4]
[1, 2, 3, 4]
2
4

This is basically everything they listed that you can do with lists.
The second video also talks about for loops. They insert if statments to count things in a list, though

list = ["cat", "dog", "dog", "cat", "cat", "cat"]
d = 0
c = 0
for n in list:
    if n == "dog":
        d += 1
    if n == "cat":
        c += 1
print(list)
print(d)
print(c)
['cat', 'dog', 'dog', 'cat', 'cat', 'cat']
2
4

The third video was about recursive loops. It was using a function that looped to remove words that were 3 letters long.

list = ["men", "boom", "gamer", "big", "no"]
def recursive_loop(n):
    if n < len(list):
        if len(list[n]) == 3:
            list.pop(n)
        recursive_loop(n + 1)
print(list)
recursive_loop(0)
print(list)
['men', 'boom', 'gamer', 'big', 'no']
['boom', 'gamer', 'no']

That's basically what they did in the third video. code written by Drew.