CBSE Class 12 Computer Science
Question 88 of 103
Working with Functions — Question 21
Back to all questions15
a = 10— This line assigns the value 10 to the global variablea.def call()— This line defines a function namedcall.a = 15— Inside the call function, this line assigns the value 15 to the global variablea. Asglobalkeyword is used earlier, this assignment modifies the value of the global variablea.b = 20— Inside the call function, this line assigns the value 20 to a local variableb.print(a)— This line prints the value of the global variablea, which is 15. This is because we've modified the global variableainside the call function.