Another way to say "walking the dog is for getting exercise" is "You can get exercise by walking the dog."