Variable scope concept

The problem is that one explained in the previous answers. The scoping rules are different depending if you are on the REPL or executing the code by including a file.