Computer Science, asked by ratinder001, 1 year ago

When is global statement used ? why is its use not recommended?​

Answers

Answered by shriharikrishna007
9

Answer:

The global statement: Declare access to a global name. The purpose of the global statement is to declare that a function or method intends to change the value of a name from the global scope, that is, a name from outside the function. ... Suppose you define a global variable x ; you can use that name inside a function.

Answered by StaceeLichtenstein
5

Following are the explanation of the Global statement is given below

Explanation:

  • Global statement are used in the programming we used the global statement when we have to access the statement in anywhere of the program it means we can access the code anywhere in the program .
  • In the memory point of you we can not recommended the global statement also if the global statement and statement inside the block is of same name then the problem is arises because the statement that is written inside the block they will vary the value of the global statement

Learn More:

  • brainly.in/question/9230422

Similar questions