Replies: 2 comments 2 replies
-
|
Once you are inspecting and optimizing the generated code, it is usually time to switch to Python directly :-) But you can do it. You can use function arguments as local variables:
|
Beta Was this translation helpful? Give feedback.
2 replies
-
|
Again, excellent recommendation, thank you very much! I had indeed forgotten about the ability to write hybrid blocks/python code! To answer your question, from my limited experience yes, the kids need local variables before they are ready to switch to python. Without local variables the code just gets very messy very soon. I could be wrong though. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
Do we get to have local variables (visible only inside a function) in block coding, or are all variables global?
It would seem very restrictive not to have local variables, but I can't see how it can be done.
Beta Was this translation helpful? Give feedback.
All reactions