Python Online Test

Start Your Test

keyboard_arrow_down

Instructions:

  • Total number of questions: 10.
  • Time allotted: 10 minutes.
  • Each question carries 1 mark.
  • No negative marks.
  • DO NOT refresh the page.
  • All the best :-)

What You Will Learn:

This Global vs Local Variables Test helps you to Boost your Knowledge in Python Language. In this test, we will cover the topics in the form of questions like
  • The function globals() returns a dictionary of the module namespace, whereas the function locals() returns a dictionary of the current namespace.
  • The global variable is shadowed, if a local variable exists with the same name as the local variable that you want to access.
  • On assigning a value to a variable inside a function, it automatically becomes a local variable.
  • globals() and locals() are said to be return value of the data structure dictionary