Skip to content

Commit

Permalink
move function theory to cusy
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristian Rother committed Jan 16, 2024
1 parent c22a1f1 commit c8c4f51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 45 deletions.
26 changes: 0 additions & 26 deletions functions/lambda_functions.rst

This file was deleted.

21 changes: 2 additions & 19 deletions functions/scope.rst
Original file line number Diff line number Diff line change
@@ -1,25 +1,8 @@
Variable Scope
==============

Python distinguishes local and global variable scope:

**local scope** refers to variables that only exist within a function.

**global scope** refers to variables that are taken from the next level
above the function definition. Usually this is the module (unless you
have nested functions).

Knowing when a variable is local and when global is especially important
when writing values. To avoid trouble, it is a good idea to avoid global
variable most of the time. Still you need to know the difference

--------------

Exercise
--------

Guess the value of the variable ‘a’ in the three programs. Check your
guess by running the code.
Guess the value of the variable ‘a’ in the three example programs.
Check your guess by running the code.

Example 1:
^^^^^^^^^^
Expand Down

0 comments on commit c8c4f51

Please sign in to comment.