Variable Scope Quiz
What is a variable's scope?
A variable's scope is the section of the code that recognizes it. If a variable is defined in a method, for example, its scope is any code inside of the methods def and end keywords.
What is a local variable?
A local variable is a variable only accessible in a certain section of code. A variable defined within a method is "local" to that method.
What will be the value of test_variable printed on the last line of the code below?
test_variable = 0
test_variable = 15
test_variable = test_variable + 6