How about starting with an exact, precise problem statement? (Do this before struggling with the ins and outs and variable types and other program considerations.)

For example, I might want to...