You have the right idea. There was just a bit too many things going on and things were not hooked up right. I simplified things - take a look at the structure and let me know if you have questions.
Other notes: when you have a boolean, instead of using a when condition, you can access the boolean directly. So instead of “correct = when graph.number(N) = 1 true otherwise false” you can simplify that to “correct = graph.number(N) = 1”, since the second part will evaluate to true/false already.
Also, instead of using the content: sink in a note, it’s a lot easier and more customizable to use variables (see example). This allows you to use formatting, etc.