figure - flow chart for the dragon realm game you also learned about variable scopes variables created inside of function exist in the local scopeand variables created outside of all functions exist in the global scope code in the global scope cannot make use of local variables if local variable has the same name as variable in the global scopepython considers it separate variable and assigning new values to the local variable won' change the value in the global variable variable scopes might seem complicatedbut they are useful for organizing functions as separate pieces of code from the rest of the program because each function has its own local scopeyou can be sure that the code in one function won' cause bugs in other functions almost every program uses functions because they are so useful by understanding how functions workyou can save yourself lot of typing and make bugs easier to fix