Another way to say "dancing is for exercise" is "one can exercise by dancing."