Can you keep the count while exercising?
When athletes train, they normally do reps, a set or a routine.
Can you think of an example of each of these exercise terms?
Build Leo, your personal trainer.
This personal trainer will help you to count your sit-ups.
If you have enough time, build your own design.
Let's try this code first.
You should see that Leo does some sit-ups by himself.
Count Leo's reps!
Now, use a variable to add a counting element to this program.
Insert the ‘set sit-ups’ block at the beginning of the programming stack to define the value which you’ll start counting from.
Add a ‘change sit-ups by 1’ block when Leo has completed one sit-up.
Add the ‘reporter’ block to the light block in order to visualise the content of your variable.
It could look something like this:
Add a second variable to count the number of calories burned.
The calories will increase by 3 for each group of 5 sit-ups.
Display the number of calories burned on the Programming Canvas.
You’ll need to create another variable that will count calories burned and display it with the Display block.
Now add some personality!
Use more bricks or change your program to give Leo more personality.
Record a video of a training session.
Think about how you did.
What did you do well? Is there anything that you could’ve done better?
..7, 8, 9, 10… keep going, you’ve got this!