Loop certain number of times then do action

I will be trying that once I order a pulldown resistor