Chapter 5: Problem 18
What is the scope of a global variable?
Short Answer
Expert verified
Answer: A global variable is a variable that is accessible throughout a program or script, usually defined outside all functions and main blocks of code. It can be accessed and modified in any part of the code, including within functions, classes, and other modules or files when properly imported. Its scope is the entire program or script.