1. सीखें
  2. /
  3. पाठ्यक्रम
  4. /
  5. Introduction to Functions in Python

Connected

अभ्यास

The keyword global

Let's work more on your mastery of scope. In this exercise, you will use the keyword global within a function to alter the value of a variable defined in the global scope.

निर्देश

100 XP
  • Use the keyword global to alter the object team in the global scope.
  • Change the value of team in the global scope to the string "justice league". Assign the result to team.
  • Hit the Submit button to see how executing your newly defined function change_team() changes the value of the name team!