How would you do it without a computer. Write out your steps in plain language on paper and be specific. Once you have that try and write these steps/tests as code.

Keep the loop simple. Let it...