00:00Guys, in this lecture, we have a important concept to discuss about the scope, which is called the scope.
00:07Scope is called visibility.
00:11You can see that you can see the scope, which is called the scope, which is called the visibility.
00:16Scope means that a program is not in the same way that all the variables are accessible.
00:24For example, we will give you a print, let's say,
00:29variable x.
00:32Right?
00:32Now, I will execute this.
00:35And it says,
00:36X name is not defined.
00:38Now, I will see that it is obvious.
00:40You can see that x is defined, declare.
00:45Okay.
00:46So, I will say that x is equal to 10.
00:50Execute.
00:51Error.
00:52Well, you can see that,
00:54you can see that,
00:56you can see that,
00:57so,
00:57anak-macholing not to do it.
00:59Python is basically,
01:02which is visibility is,
01:04which is seven lines,
01:05which is on the top.
01:06It is like this,
01:07you can see that,
01:08sir, python is on the top.
01:11Okay?
01:12Python is on the top.
01:12So,
01:13you can see that,
01:13you can see that,
01:14you can see that,
01:15so,
01:16when you see that,
01:17Python is on the top.
01:18So,
01:18here is this,
01:19you can see that,
01:20so,
01:21here is the error.
01:22print เคเคฐ เคฆเฅเคคเคพ เคนเฅ
01:23เคคเฅ basically
01:24เคฏเคน เคเฅ print function เคนเฅ
01:27เคเคธเคเคพ เคเฅ scope เคนเฅ
01:28เคตเฅ line 7 เคธเฅ เคเคชเคฐ เคเคชเคฐ เคนเฅ
01:30เคฏเคพเคจเคฟ เคเคฟ เคฏเคน เคเฅ เคฆเฅเค เคฐเคนเคพ เคนเฅ
01:33เคเคธเคเคพ เคเฅ region
01:33vision of region เคนเฅ
01:36เคเคฟเคธ region เคเฅ เค
เคเคฆเคฐ เคฏเคน เคฆเฅเค เคฐเคนเคพ เคนเฅ
01:38เคเคธเคเฅ เคเคเคเฅ เคเฅเคฒเฅ เคนเฅเค เคนเฅ
01:39เคเคฟเคธ region เคเฅ เค
เคเคฆเคฐ เคฏเคน expect เคเคฐ เคฐเคนเคพ เคนเฅ
01:41เคตเฅ region เคนเฅ line 1 to line 6
01:45เคเคธเคพ เคฏเคน เคจเคพ เคฏเคน region เคนเฅ
01:48เคเคธเคเฅ เค
เคเคฆเคฐ x เคเฅ exist เคเคฐเคจเคพ เคเคพเคนเคฟเค
01:50เคฏเคน print function เคเคพ scope เคนเฅ
01:52เค เฅเค เคนเฅ
01:53เคเคฟ เคเคฟเคธเคเฅ เค
เคเคฆเคฐ เคเคธเคเฅ visibility เคนเฅ
01:55เคเคธเคเฅ เคฌเคพเคค เคเคพเคนเคฟเค เคเคช x define เคเคฐเฅเค
01:57เคเคธเคเฅ เคเคนเคคเฅ เคนเฅเค scope
02:02เค
เคฌ เคฅเฅเคกเคผเคพ เคธเคพ
02:03เคฎเฅเค เคเคธเคเฅ ramp up เคเคฐเคจเฅ เคฒเคเคพ เคนเฅเค
02:04เคเค word เคเคชเคฐ เคเคพเคจเฅ เคฒเคเคพ เคนเฅ
02:06เค
เคฌ imagine เคเคฐเฅเค
02:08เคเคฟ
02:09เคเคธเคเฅ remove เคเคฐ เคฆเฅเคคเคพ เคนเฅเค เคฎเฅเค
02:12เคเคฐ
02:18เคเคฐ เคฏเคนเคพเค เคชเฅ
02:25เคฎเฅเค เคเค variable เคกเคฟเคซเคพเคเคจ เคเคฐเคคเคพ เคนเฅเค
02:28let's say c is equal to 20
02:29เคธเคนเฅ เคนเฅ
02:31เค
เคฌ เค
เคเคฐ เคฎเฅเค เคฏเคนเคพเค เคชเฅ print เคเคฐเคคเคพ เคนเฅเค
02:34print
02:35c เคเคฐ execute
02:38เคเคฐเคคเคพ เคนเฅเค
02:39เคคเฅ c basically visible เคนเฅ
02:42right
02:43however
02:45เค
เคเคฐ เคฎเฅเค เคเคธ c เคเฅ
02:48เคเคธเฅ เคนเฅ เคฐเคเคคเคพ เคนเฅเค
02:50เคเคฐ เคเค function define เคเคฐเคคเคพ เคนเฅเค
02:51def name
02:52def name
02:54เคเคฐ c
02:55exactly เคตเคนเฅเค เคชเฅ เคเคกเคผเคพ เคนเฅเค เคนเฅ
02:57เค
เคฌ เคฎเฅเค เค
เคเคฐ เคเคธเคเฅ print เคเคฐเคคเคพ เคนเฅเค
02:59เคคเฅ เคฏเคน เคฎเฅเคเฅ เคเคน เคฐเคนเคพ เคนเฅ
03:01c is not defined
03:02เคคเฅ เคเคชเคเฅ เคเฅเคฏเคพเคฒ เคธเฅ เค
เคฌ เคเฅเคฏเคพ เคนเฅเค
03:05เคเคธเคเคพ เคฎเคคเคฒเคฌ เคฏเคน เคนเฅ
03:07เคเคฟ เคเคฌ เคเคช function define เคเคฐเคคเฅ เคนเฅเค
03:11เคคเฅ function เค
เคชเคจเฅ scope เคเฅเคฆ เคฒเฅ เคเฅ เคเคคเคพ เคนเฅ
03:14เคเคฐ เคเฅ function เคเฅ เค
เคเคฆเคฐ variables เคนเฅเคคเฅ เคนเฅเค
03:18เคเฅเคธเฅ เคเคฟ เคเคช เคฆเฅเค เคฐเคนเฅ เคนเฅเค
03:20เคตเฅ basically function เคธเฅ เคฌเคพเคนเคฐ accessible เคจเคนเฅเค เคนเฅเคคเฅ
03:23function เคเฅ เค
เคเคฆเคฐ เคฏเฅ เคธเคฎเคเคฟเคฏเฅ เคเคฟ เคเฅ เคญเฅ code เคนเฅเคคเคพ เคนเฅ
03:28เคตเฅ เคเค ุฎุงูุฏเคพเคฎ เคเฅ เคคเคฐเคน เคนเฅเคคเคพ เคนเฅ
03:30เคเค เคเคฐ เคเฅ เคคเคฐเคน เคนเฅเคคเคพ เคนเฅ
03:31เคเคฐ เคเคฐ เคเฅ เคเฅ เคเฅเคเคผเฅเค เคนเฅเคคเฅ เคนเฅ
03:33เคตเฅ เคธเคฟเคฐเฅเคซ เคเคฐ เคตเคพเคฒเฅเค เคเฅ เคฒเคฟเค accessible เคนเฅเคคเฅ เคนเฅ
03:35เคเคฐ เคธเฅ เคฌเคพเคนเคฐ เคตเคพเคฒเฅเค เคเฅ เคฒเคฟเค accessible เคจเคนเฅเค เคนเฅเคคเฅ เคนเฅ
03:37เคเคฌ เคญเฅ เคเคช เคเค code เคฒเคฟเคเคคเฅ เคนเฅเค
03:39เคคเฅ เคเคธ code เคเคพ structure เคฏเคน เคนเฅเคคเคพ เคนเฅ
03:41เคเฅ เคเคช เคเค main function definition
03:43define and inside of all blocks.
03:46Okay, so this is the limit.
03:49However, this level is the indentation level.
03:54Indentation level is the point.
03:57This function definition is the point.
04:00This function is the point.
04:03This function is the point.
04:06This function is the point.
04:08This function is the point.
04:11This function is the point.
04:21This function is the point.
04:23This function is the point.
04:25This function is the point.
04:27However, if we keep it in this loop or in this loop,
04:31it's totally visible.
04:33However, if we keep it in this function,
04:35it's not visible.
04:37Okay, so here I will close this function with a tag summary line
04:44That a function is a house, a house, a house
04:49Now, the house inside the house, which you can understand the variable
04:54The things that are only for the house, it's only for the use of the house
04:58That the scope of the house is local
05:02Local people, local people, who can use them
05:07If you can access them, if you can access them, it's not possible
05:12Because a scope of the house is a scope
05:15And that scope is a scope, which is basically accessible
05:19For the house, it's not for the house
05:21So you can understand a function, a family example
05:23Now family inside the things, inside the people
05:27They are accessible, use them for the house
05:30It's not for the house, it's not for the house
05:33So these are scope, use them for the house
05:35So these are scope, the concept
Comments