Understanding the scope of a function

Functions have their own section that the rest of the Python code cannot access, that's called the scope.

Пікірлер: 2

  • @aracristiano462
    @aracristiano4625 ай бұрын

    thanks for your video it was descriptive and clear, i like the way you taught, by the way in your example i chained the multiplication with conditional statement if the multiplication is true i change the state of the has_calculated variable to true then return the value of the multiplication which i stored in a variable inside the function if you use the keyword global is going to change the and modify the variable outside the function

  • @agriasoaks6721
    @agriasoaks67215 ай бұрын

    Sensei, doesn't that make local and global variables are treated differently in GDScript?