Return to Video

Scope Quiz - Design of Computer Programs

  • 0:00 - 0:06
    Well, let's see and the answer is 8. So here what's happening. Python is looking for x and y.
  • 0:06 - 0:09
    It finds y inside the local scope of add_nums.
  • 0:09 - 0:11
    It doesn't find x inside that local scope so it moves up
  • 0:11 - 0:13
    into the globe of variables and it finds x there.
  • 0:13 - 0:16
    It makes use of it--6 + 2 is 8.
タイトル:
Scope Quiz - Design of Computer Programs
概説:

more » « less
Video Language:
English
Team:
Udacity
プロジェクト:
CS212 - Design of Computer Programs
Duration:
0:17

English subtitles

改訂 Compare revisions