Ada Lovelace's first program
Click the green flag to start.
Click the green ticks to continue to the next message. When Ada asks you to enter a number, type in a number 1 or more. Bigger numbers take longer to calculate.
When Ada asks you if you want to try again, enter 'no' to stop.
I made this for Ada Lovelace day which is on the 15th of October.
The algorithm used in this program follows the design Ada describes in her Note G to Sketch of The Analytical Engine Invented by Charles Babbage.
In Ada's notes, the Numbers of Bernoulli start with B=1/6 and the even numbers are 0 rather than B=1/6 with the odd numbers equal to 0. The numbers are only accurate to a few decimal places due to accumulated rounding errors within Scratch.