English subtitles

← Scope Quiz - Design of Computer Programs

Get Embed Code
1 Language

Showing Revision 3 created 05/25/2016 by Udacity Robot.

  1. Well, let's see and the answer is 8. So here what's happening. Python is looking for x and y.
  2. It finds y inside the local scope of add_nums.
  3. It doesn't find x inside that local scope so it moves up
  4. into the globe of variables and it finds x there.
  5. It makes use of it--6 + 2 is 8.