OCR GCSE (9-1) Computer Science Scratch …

You may think this will print 20 but it prints 10, In Python the scope of a variable lies within a function. If there is not a name assigned within the function it looks outside of it, but not in other functions. If you want a variable in function to be treated as a global variable … ................
................