GLOBAL & LOCAL VARIABLE - PYTHON PROGRAMMING

  Рет қаралды 95,249

Sundeep Saradhi Kanthety

Sundeep Saradhi Kanthety

Күн бұрын

Пікірлер: 102
@pythonthepythonist6439
@pythonthepythonist6439 2 жыл бұрын
My Software transition started after watching your videos, people like you make a lot of difference to the world, i watch many people videos but the better clarity comes when i watch yours.
@unitech23
@unitech23 Жыл бұрын
I've watched many different teachers but you truly explain it in a way a child can learn. Thank you so much for sharing with us all your gift of teaching.
@sivakarthiksiva4739
@sivakarthiksiva4739 3 жыл бұрын
best teaching skill you have.....love from my heart
@budaykumarrao7612
@budaykumarrao7612 4 жыл бұрын
U gived a one of the best performance We understood easily Thank you sir
@anshulpant9270
@anshulpant9270 3 жыл бұрын
this concept is very difficult to teach but appreciate you work you have done a great job.. everything is cleared ..thank you so much sir... appreciate that
@seraphcarrier5241
@seraphcarrier5241 2 жыл бұрын
I know these things. Just here to master it. Is all.
@saranyapampana134
@saranyapampana134 2 жыл бұрын
guys trust me he is amazing. Just a tip watch the video at 1.25X speed but it's up to you.
@dawitkefyalew2618
@dawitkefyalew2618 9 ай бұрын
Good job, thank you so much. Now I understand the difference between them.
@kdeepak4446
@kdeepak4446 4 жыл бұрын
You are the best teacher 🙏 sir..keep uploading more videos
@KOTHAABHISHEK
@KOTHAABHISHEK 3 жыл бұрын
You missed two things bro 1) we can change the value of global variable from the function using global keyword 2)we can call the global variable from function when both having same name by using globals()
@jayanth01
@jayanth01 Жыл бұрын
Thank you for your teaching sir Concept cleared
@vishnureddy-k5d
@vishnureddy-k5d Жыл бұрын
sir u r voice very sweet best teacher skill ever
@angelthedecentgirl7181
@angelthedecentgirl7181 2 жыл бұрын
Aamzing explanation sir! You are the best! Thank ytou so much Sir.
@vijay-ei8xz
@vijay-ei8xz 4 жыл бұрын
Thankyou sir with very easy you explained this topic ♥️
@anushreejoshi1829
@anushreejoshi1829 Жыл бұрын
Thankyou so much sir...uh are amazing....Everything is cleared...💯
@ot7ismyreligion
@ot7ismyreligion Жыл бұрын
amazing sir...i understood the concept which i had been struggling with
@Greennuts
@Greennuts 3 жыл бұрын
i love u from bottom of my heart
@krishnakanthsudhakar-hx2nt
@krishnakanthsudhakar-hx2nt Жыл бұрын
your teaching is beautiful sir
@KalyanKumar-tt9hh
@KalyanKumar-tt9hh 2 жыл бұрын
Main function ki oka local variable vundhi, User defined function ki oka local Variable vundhi...Execute chesthe output ga ey variable vasthundhi
@arunakumari328
@arunakumari328 3 жыл бұрын
Sir classes are simply awesome 👌sir
@jojven7514
@jojven7514 2 жыл бұрын
THANK YOU SIR FOR MAKING VDO ON THIS TOPIC 🙏🙏🙏😇😇😇
@ritamdutta8098
@ritamdutta8098 Жыл бұрын
excellent way of teaching
@pawangoled9622
@pawangoled9622 Жыл бұрын
If we intialize the variable after the user defined function what will be the value of a?
@akashjulius4445
@akashjulius4445 2 жыл бұрын
love from pakistan great teacher
@priyankagoud1736
@priyankagoud1736 2 жыл бұрын
Thanks for the clear cut video
@kanusuya8712
@kanusuya8712 4 жыл бұрын
Super sir.. U explained very clearly.. We can easily understand your teaching method..
@princeowusuansah5031
@princeowusuansah5031 Жыл бұрын
Please why is a=40 a local variable and not global Because I thought a=40 was not part of the def display() function.
@billyboy_679
@billyboy_679 7 ай бұрын
Absolute Legend..
@priyadharshiniveeranthiran4329
@priyadharshiniveeranthiran4329 4 жыл бұрын
Thank you sir.I know more with this session and it is very easy for understand
@digitalduniyag.a2748
@digitalduniyag.a2748 4 жыл бұрын
Sir you are great .. But sir pleae upload one video regarding main and user define function ... How can we diffrentiate between them. .. And how would we use both in one progam
@muruga30
@muruga30 4 жыл бұрын
Example: #1 def add(): #2 a=10 #3 b=20 #4 print(a+b) #5 add() #6 print("End") A user defined function ends with : ,that is function header. After colon (:) the statements are pressed with space that is Indentation that is function body. Here the line #1,#2,#3,#4 are user defined function. #5 and #6 doesn't have any indentations. That is main program or top level statements
@yogeerao9149
@yogeerao9149 2 жыл бұрын
Can you please make one video about "How Python Manage Memory" Thanks in Advance
@jatindersingh2241
@jatindersingh2241 4 жыл бұрын
very well explained ,Thanks
@Greennuts
@Greennuts 3 жыл бұрын
thank u sir
@abuchiemmanuelugwuoke3208
@abuchiemmanuelugwuoke3208 3 жыл бұрын
Thank you so much this was so helpful
@somethingnew4703
@somethingnew4703 2 жыл бұрын
Sir local and global variables lo same names icchinappudu first prefeerence local variable ki ivvali ani chepparu kada sir kaani maa sir first preference highest value ki ivvali ani chepparu idi correct yena sir
@krishnapulimi9402
@krishnapulimi9402 5 жыл бұрын
Very clear to explain sir... thank you sir Programs only written sir, Please see the execution also
@_weebxarmy_2009
@_weebxarmy_2009 3 жыл бұрын
Great explanation thank you so much sir
@chennupatiharika9863
@chennupatiharika9863 4 жыл бұрын
Sir as u said in structure of a c program.we have to write user defined function after the completion of main function so,here in this concept u discussed like main function will come after the user defined function....so..here I have doubt like both are same or not......?
@sundeepsaradhi
@sundeepsaradhi 4 жыл бұрын
Hi First we have to write user-defined function and then we have to write function call.
@chennupatiharika9863
@chennupatiharika9863 4 жыл бұрын
@@sundeepsaradhi helpfull......tq sir
@shinimannan
@shinimannan 4 жыл бұрын
Sir, great session, Thanks. Have a very basic question. Have not understood what is the use of the line -> def display ( ): in the user defined function and the line -> display( ) in the main function.
@chennupatiharika9863
@chennupatiharika9863 4 жыл бұрын
Def display: definition section..... I.e fun definition Display:main function section I.e fun call
@taonachinhamo4790
@taonachinhamo4790 Жыл бұрын
🔥🔥🔥 thank u!
@vignesh.s6829
@vignesh.s6829 2 жыл бұрын
Keep doing 🔥✨
@d240deepak3
@d240deepak3 4 жыл бұрын
Super explanation
@samiyabanu3792
@samiyabanu3792 2 жыл бұрын
Thank you so much sir 💖
@muruga30
@muruga30 4 жыл бұрын
a=10 # global def disp(): print(a) def show(): a=20 # local print(a) # o/p =20 =>here I want to access global var a. Is possible in python.
@sathishyerraguntla8099
@sathishyerraguntla8099 3 жыл бұрын
yes it is possible
@Mrbeansololover
@Mrbeansololover 3 жыл бұрын
a=10 #global def disp(): print(a) def show() a=20 a= globals ()['a'] print(a) #with the use globals () we can get the global variable instead of local variable
@Mrbeansololover
@Mrbeansololover 3 жыл бұрын
Here it will print global variable
@hocminergaming4015
@hocminergaming4015 2 жыл бұрын
really helpfull sir
@sainani3664
@sainani3664 5 жыл бұрын
Pls do videos on practice programs on evry topic with explanations...
@santoshkumarkar39
@santoshkumarkar39 2 жыл бұрын
Very very good
@siyaborker9904
@siyaborker9904 Жыл бұрын
why is c a local variable? it is defined in the main right
@sayraislive5330
@sayraislive5330 4 жыл бұрын
Sir, How you got your video on too of KZbin search
@thriambakm5400
@thriambakm5400 4 жыл бұрын
Sir can you teach me program based on matrix in python
@13naaz
@13naaz Жыл бұрын
LEGB rule is missing sir.. global and globals keywords explanation..
@NandWebDev
@NandWebDev 5 жыл бұрын
vera level mama neenga
@chetanshukla5851
@chetanshukla5851 5 жыл бұрын
Nice explaination sir Thank you sir
@d.sairamdronamraju1555
@d.sairamdronamraju1555 3 жыл бұрын
Thank you sir
@s.santhosh4668
@s.santhosh4668 3 жыл бұрын
Thankyou sir😁
@arunakumari328
@arunakumari328 3 жыл бұрын
Thanks sir
@naganaboyinalakshmivenkate5177
@naganaboyinalakshmivenkate5177 Жыл бұрын
sir pls explain the topics with matter
@reshmaittiachan5489
@reshmaittiachan5489 5 жыл бұрын
good explanation :-)
@sajisebastian1586
@sajisebastian1586 4 жыл бұрын
When global and local variable with same name, how can I access global variable from local scope area
@AjayJain-ef2mz
@AjayJain-ef2mz 4 жыл бұрын
hey i think i can solve your problem. #creating a global variable a = 10 def prnt(): #creating a local variable a=20 #Now we want to access 'a' with value 10 x = globals()['a'] print(x) #this will print 10 globals()['a'] = 20 #value of global variable a has been changed to 20
@venkym3148
@venkym3148 6 жыл бұрын
Sir still how many videos left for entire python course??
@chandanrajanna705
@chandanrajanna705 4 жыл бұрын
good one
@goutham8751
@goutham8751 5 жыл бұрын
thank u sir u helped me a lot
@praveenkumar3040
@praveenkumar3040 Жыл бұрын
nice sir
@HimanshuKumarAN
@HimanshuKumarAN 4 жыл бұрын
Sir why is local variable preffered over global variable? If both have same name. sir please help .
@chennupatiharika9863
@chennupatiharika9863 4 жыл бұрын
Local variable:these variables are restricted in tht particular function..i.e.we can access these local variable only tht where we declared tht variable... Global variables:we access these global variables entire the program.....where ever we need we can use.. ....................... So always better to declare globally...
@mohammedsajeed9398
@mohammedsajeed9398 Жыл бұрын
@@chennupatiharika9863 that means we are fixing the global variables as constants, is it right to say?
@murthyariga4689
@murthyariga4689 3 жыл бұрын
Hi Sir @Sundeep Saradhi Kanthety, I have a function which has a variable "X", can I use the same variable X out side the function ?
@sundeepsaradhi
@sundeepsaradhi 3 жыл бұрын
Hi Yes you can use
@murthyariga4689
@murthyariga4689 3 жыл бұрын
@@sundeepsaradhi okay thank you
@jeetendranathmishra3701
@jeetendranathmishra3701 3 жыл бұрын
Sir can you please make a video on global keyword.
@krishnadesai4538
@krishnadesai4538 4 жыл бұрын
very helpful sir thank you
@manirock6216
@manirock6216 4 жыл бұрын
error local variable 'config_ referenced before assignment how to solve this
@rajeshkumar-rg9id
@rajeshkumar-rg9id 4 жыл бұрын
Hi sir,in user defined function instead print i think we need to write return?
@beetlenut6980
@beetlenut6980 3 жыл бұрын
Not necessarily, In case you want the program to return some value you should not write print For example: def addNum(num1, num2): print(num1 + num2) addNum(2, 3) Output: 5 What happened here is the function just prints something to screen for this example it's 5, Now if you want this result to store in a variable it's not gonna work out so that's where return comes in. def addNum(num1, num2): return num1+num2 answer = addNum(2,3) print (answer) Here you can assign the function answer into an variable so that you can use it later :)
@santoshkumarkar39
@santoshkumarkar39 2 жыл бұрын
Same as Java
@city_roczs971
@city_roczs971 5 жыл бұрын
Sir please one more video on functions and nested function
@hanu-tw3js
@hanu-tw3js 4 жыл бұрын
Sir after calling function we some a=10 a is global or local variable because it is out side the function???
@tanmaypandey9133
@tanmaypandey9133 5 жыл бұрын
SIR I HAVE A DOUBT ABOUT FACTORIAL OF A NUMBER IN WHILE LOOP AND FOR LOOP.
@pawangoled9622
@pawangoled9622 Жыл бұрын
I mean the output
@harikav3443
@harikav3443 6 жыл бұрын
Sirr CG gurinchi cheyyandi sir.inka konni topics
@rumagoswami3272
@rumagoswami3272 5 жыл бұрын
superb
@naidudarapu6891
@naidudarapu6891 5 жыл бұрын
Super
@westfield90
@westfield90 5 жыл бұрын
Only part I didn’t understand was the bottom part you said was a main function. Don’t you have to define the main function ?
@pallavis8618
@pallavis8618 5 жыл бұрын
If we have to access global variable inside function definition and both global and local variable have same name
@icebear6904
@icebear6904 4 жыл бұрын
I think then we have to specified Global 'variable name' inside a function to use the same name variable. Otherwise function used the local variable for the operation.
@ramzy8814
@ramzy8814 4 жыл бұрын
Just try it yourself and see the result
@AjayJain-ef2mz
@AjayJain-ef2mz 4 жыл бұрын
​@@icebear6904 Can you please send a brief code as it didn't work for me.
@sandeepjella3270
@sandeepjella3270 5 жыл бұрын
good
@sajayad5182
@sajayad5182 3 жыл бұрын
I not understand sir
@manjulabestha3675
@manjulabestha3675 2 жыл бұрын
Thank u sir
@raginim3237
@raginim3237 2 жыл бұрын
Thank u sir
@manjulavg4686
@manjulavg4686 4 жыл бұрын
Thank u sir
TYPES OF ARGUMENTS IN FUNCTIONS - PYTHON PROGRAMMING
20:56
Sundeep Saradhi Kanthety
Рет қаралды 119 М.
local and Global Scope in Python | Python Tutorials for Beginners #lec78
14:34
Jenny's Lectures CS IT
Рет қаралды 43 М.
She's very CREATIVE💡💦 #camping #survival #bushcraft #outdoors #lifehack
00:26
小路飞嫁祸姐姐搞破坏 #路飞#海贼王
00:45
路飞与唐舞桐
Рет қаралды 27 МЛН
iPhone or Chocolate??
00:16
Hungry FAM
Рет қаралды 55 МЛН
Python Functions (The Only Guide You'll Need) #12
17:20
Programiz
Рет қаралды 588 М.
Python Decorators in 15 Minutes
15:14
Kite
Рет қаралды 445 М.
RECURSION - PYTHON PROGRAMMING
10:00
Sundeep Saradhi Kanthety
Рет қаралды 158 М.
INTRODUCTION TO FUNCTIONS - PYTHON PROGRAMMING
14:45
Sundeep Saradhi Kanthety
Рет қаралды 211 М.
Python for Beginners - Learn Python in 1 Hour
1:00:06
Programming with Mosh
Рет қаралды 18 МЛН
FILES (OPEN,CLOSE,ACCESS MODES) - PYTHON PROGRAMMING
22:59
Sundeep Saradhi Kanthety
Рет қаралды 130 М.
7. Global Variables & Local Variables in Python
9:52
WafaStudies
Рет қаралды 12 М.
She's very CREATIVE💡💦 #camping #survival #bushcraft #outdoors #lifehack
00:26