Computer Science

What is a variable defined outside all the functions referred to as ?

  1. A static variable
  2. A global variable
  3. A local variable
  4. An automatic variable

Python Functions

3 Likes

Answer

A global variable

Reason — A global variable is a variable declared in top level segment (__main__) of a program and usable inside the whole program and all blocks contained within the program.

Answered By

1 Like


Related Questions