Do you know that to play this exercise, and most scale exercises, you keep your hand in place unless you absolutely have to move it? This makes a lot of sense, which you can see for yourself if you've tried to move your hand around to get at different notes. After a while, your poor hand says, "Forget it man. If I'm gonna be doing all this moving around, why don't we just play drums instead?"
Keeping your hand in place when possible means that you'll be doing stretches with some of your fingers to hit those occasional notes that don't sit within a span of four frets. (But the exercise just given involves no such stretches.) Which fingers do you stretch? Your first and your last (or your index finger and your pinky). This intro to positioning your hands and fingers could get us into a whole new topic, but let's focus on the one exercise for now. Just remember:
*When playing scales, keep your hand stationary whenever possible. If you need to play a note outside of the four-fret span, stretch your index or pinky to get it.*