Now let's consider a slightly more complicated block that makes use of a loop.
It accepts two numbers as inputs (start
and end
)
and finds the sum of all of the numbers in the range from start
to end
, inclusive.
When start = 8
and end = 10
, the value reported by this function will be 27
(8+9+10).
How do you think you'd make this block? Try building it and see if you can make it work.