Answer:
Explanation:
Please specify which programming language this is supposed to be written in.
Without knowing that, only the last part can be answered "how many different initial speeds will you need to test this code?"
You will need to test at least 3 initial speeds: one below the lower-set-speed, one between the lower- and upper-set-speed and last one which is above the upper-set-speed.