My QA Projects

QA Projects I was involded.

View on GitHub

Namespace [still draft]

  name   value
  variable name   value
  function name   function definition

Function Defintion

Function call

Scoping rules

Built-in namespaces

Global namespaces

Global namespaces Example

https://ucbx.hosted.panopto.com/Panopto/Pages/Viewer.aspx?id=bd4b31b3-a6ea-4269-9296-af0900bb8250

screenshot

Local namespaces

screenshot

Global Statement

global variable

Local Statement



Namespaces and Scope

# you can get the value of a global variable from within a function

animal = 'fruitbat'
def print_global():
    print('inside print_global: ', animal)

print('at the top level: ', animal)
# Output
at the top level: fruitbat
print_global()
# Output
inside print_global: fruitbat