The persons who prefer bodybuilding
know the meaning of repetition. For example, I do bench press for 7
repetitions. We can organize this example systematically as the following
statement.
Therefore, the for statement allows us to
perform an action several times. The above for statement performs bench press
for 7 times. Here we use for statement to calculate the sum of numbers from 1
to 100 which was solved by while statement in the previous section.
沒有留言:
張貼留言