dear harry sir, 10:57 Quiz-: that will print 88 because the global keyword will go outer side of the nested functions and read for any variable 'x', and it will be successful also, so that will change the value of x(89) to x(88). Thanks for this great content.
I'm a mechanical engineer but I always wanted to learn programming. Thanks to you that you have created a channel and started to teach us programming.. Don't stop teaching.. You're a great teacher. Loved your lessons.. Keep it up!!
same here bro.......i am mechanical engineer but always wanted to learn programming .. like this...good channel for python learning......in this tutorials harry always try to explain with which problems beginner will face......
11:03 It will print 88 because above the code x = 88 we have written global x which will change the value of the x that is written outside the function the value was 89 but by the global function it will make it 88 and hence it will print 88
11:02 It will print 88 because in the rohan function you used global keyword which go out of the function and search for the global variable x and after finding it will change its value to 88 and print the value.
Bhai may nay literally tail bachata. You are just awesome. Your teaching techniques sense of humor really awesome. Keep up the good work. Bhai ek interview tips ya fir resume/linkedin profile builder jesa koi video bana do plz. Keep up the good work.
bhai aap ho kya??? itna easily concept samjha dete ho jaise maza chal raha hain... Tussi great ho harry bhai. Thank you very much. Subha subha harry bhai ki class ho toh padhne me maza he aajata hain :-) :-)
I would like to thank you for the efforts you have made. I am hoping the same best work from you in the future as well. Please make videos on Machine Learning, AI, Data science.
10:58 : Harry bhai I think the print(x) will print 88 cuz when you call harry() rohan() is also executed. So it will change the value of global x as 88. Thus the print() function will return 88
first, it will print x as 20 because the first time x is printed under harry() function and harry() function has its own value of x and then it will print x as 88 because when the harry() function called rohan() function also called andit changed the value of x from 89 to 88 with the help of global variable
11:13 bro uska answer hai ki vaha par 88 print hoga because jab vo fungtion pehle call kiya tha to vaha par global scope me variable nahi tha par jab aapne x = 89 bana diya to fungtion me usko pehle se hi global variable change karn eki permission thi to usne global x ko 88 bana diya to fir 88 hi print hoga.
answer to the quiz of the day is 88 because global keyword will go in outer side of program and search for any variable x and then search will become successful and it will change value of x from 89 to 88 thanks bro for this amazing content
harry bhai, answer is 88 because we have assigned x as a global variable and also get the right to change it by typing global x so it we will give the changed number not the globally assigned number.Thank you all because of you i am here answering your quiz question because you teached me.
It will print 88 but if we call the function harry() after the print statement it will print 89 because first it searchs globally but sees that the user has called a function and then prints the x value in the function. Thank you for such quality content.
first one go to harry function in which x = 20 assigned to the x and in the harry function go to rohan function after out from the rohan function and our global variable x = 88 the print statment print the x = 20 because x = 20 is already in harry function so not preference for the global x = 88. and last print x = 88.
Maine galat guess kiya tha first time 89 but fir se video dekha tab smj aaya then 88 ,great bhai jaan apki video tutorial mai daily follow kr raha hu ...
The way you explain is exceptional !!! Thankyou bhaiya❤️.. aapka python full course in hindi wala video dekh ke maine bht kuch sikha... Thankyou once again!!❤️😊🙏
Literally this video is very helpful for me... you don't believe I've watched this video many times whenever I forgot this topic, and even I've refer this video to many of my friends who often encounter same problem. Really it's amazing and concept clearing video sir....thanks😘😘
quiz answer is 88 because firstly, it will take 89 as global var, then, it will call harry(), then,local value of x will be 20, then,it will call rohan(), the global value of x would be 88 now and print statement within the function will print 20 print statement outside the function will print 88
U are a superb teacher ❤❤❤ God bless u.. u are helping so many people by providing this course..thnku..this lec was really interesting and i understood whtever u taught in this video..thnku so mucch for such videos
sir 88 output aayega because before the nested function value of x was 89 but in function rohan() We called global x and then we assigned the value of x to 88 So when we print x then we'd will get 88 as the output
The Output will be 88 because above the code x = 88 we have written global x which will change the value of the x that is written outside the function the value was 89 but by the global function it will make it 88 and hence the output will be 88
sir from inside that is from harry's function we will get x =20 as printed outcome as there was no change in the local variable and when from the rohan's function which changes the external predefined global variable(89) to 88 that is why we get output has: after calling rohan() 20 88
Sir, it will print 88 because in the global variable it is 88 and when it will go up out of the nested function it will find the variable X it's value is 89 so it will change the value to 88
Sir the output for the harry() will be 88 because as you mentioned the global keyword will directly search for the x out of the def harry() and the x = 89 will be changed to x = 88 and the output for it definitely will be x = 88
I have an example for better understanding. Let I am living in my house in apartments. Akshay Kumar is my family member and his is age 20. Print(Akshay kumar age) 20 Global ( Bollywood ) Akshay Kumar Print(Akshay kumar age) 52 If we don't have Akshay kumar in my family but in my apartments. print (Akshay kumar age) it won't check in apartments(Nested function) for Akshay whether he exist or not. It print global (Bollywood) Akshay kumar age. 52
dear harry sir,
10:57
Quiz-: that will print 88 because the global keyword will go outer side of the nested functions and read for any variable 'x', and it will be successful also, so that will change the value of x(89) to x(88).
Thanks for this great content.
yz
thanks for the answer of quiz :)
hey who are you man please tell me, man
@@digitalcodingwithyashu6557 what you want to know?
nice
explaining the scope as govt ka paisa and apna paisa is a very good example👍🏻👍🏻
bhaii 8:14 me global ke baad x accept ho raha h tera mera nhi ho paya kya galti hogi kuch pata h
@@gautambh375 aap apna code bhejo
I'm a mechanical engineer but I always wanted to learn programming. Thanks to you that you have created a channel and started to teach us programming.. Don't stop teaching.. You're a great teacher. Loved your lessons.. Keep it up!!
same here bro.......i am mechanical engineer but always wanted to learn programming .. like this...good channel for python learning......in this tutorials harry always try to explain with which problems beginner will face......
Same here, I am also a mechanical student I love to learn python programming.
same here bro .......ithink we should make a group of mechanical engineers ..........please join in telegram @mechnorobes
Same here I am a gig worker
Same
one of the finest yt channels for learning python
lots of love from Nepal sir thank you
11:03
It will print 88 because above the code x = 88 we have written global x which will change the value of the x that is written outside the function the value was 89 but by the global function it will make it 88 and hence it will print 88
11:02
It will print 88 because in the rohan function you used global keyword which go out of the function and search for the global variable x and after finding it will change its value to 88 and print the value.
11:15
Output:
after calling rohan() 20
88
11:03
print 88 bcz global keyword will go outside and read any variable x and it will change 89 to 88
I just get the conception of global keyword only watching one time great work harry bhaiya
10:57
The answer will be 88,
because of the use of global keyword in the function, the value of x changed completely
Bhai may nay literally tail bachata.
You are just awesome. Your teaching techniques sense of humor really awesome. Keep up the good work. Bhai ek interview tips ya fir resume/linkedin profile builder jesa koi video bana do plz.
Keep up the good work.
I was too confused about Global Keyword but you cleared my doubts
Thank you CodewithHarrybhai
bhai aap ho kya??? itna easily concept samjha dete ho jaise maza chal raha hain... Tussi great ho harry bhai. Thank you very much. Subha subha harry bhai ki class ho toh padhne me maza he aajata hain :-) :-)
I would like to thank you for the efforts you have made. I am hoping the same best work from you in the future as well. Please make videos on Machine Learning, AI, Data science.
As mechanical engineer coding is easy i have never expected. Thank you so much...
Thankyou harry bhai 1 week ho gya hai start kre & literally you r osm
the way you teach like a friend # sab samaj aata hai or acche se
Awesome videos bhai ... apke efforts se sab log acha sikh rhe hai including me ... keep going harry bhai
Best channel of hindi coding😇
10:58 : Harry bhai I think the print(x) will print 88 cuz when you call harry() rohan() is also executed. So it will change the value of global x as 88. Thus the print() function will return 88
Thanks 🙂
first, it will print x as 20 because the first time x is printed under harry() function and harry() function has its own value of x
and then it will print x as 88 because when the harry() function called rohan() function also called andit changed the value of x from 89 to 88 with the help of global variable
thankyou harry bhai aap hamare liye bahut mehenat karto ho
11:13 bro uska answer hai ki vaha par 88 print hoga because jab vo fungtion pehle call kiya tha to vaha par global scope me variable nahi tha par jab aapne x = 89 bana diya to fungtion me usko pehle se hi global variable change karn eki permission thi to usne global x ko 88 bana diya to fir 88 hi print hoga.
answer to the quiz of the day is
88 because global keyword will go in outer side of program and search for any variable x and then search will become successful and it will change value of x from 89 to 88
thanks bro for this amazing content
00:01 "harry bhai bahut achhe hain " output XD :-)
harry bhai, answer is 88 because we have assigned x as a global variable and also get the right to change it by typing global x so it we will give the changed number not the globally assigned number.Thank you all because of you i am here answering your quiz question because you teached me.
my ode is working after watching this video. Thank you
thank you so much for the nested example. i was searching about it all over the internet but could only find it here. tysm!!!!!
Useful Video, my problem Solved after see this video.......
It will print 88 but if we call the function harry() after the print statement it will print 89 because first it searchs globally but sees that the user has called a function and then prints the x value in the function.
Thank you for such quality content.
The way you explained, the govt. explanation.. was quite awesome.
10:57
it will print 88 because you have changed the value of 88
Me 10 bar dekha bhai or pura clear thanks Harry bhai
just wanted to say thank you harry sir♥ because of you only mene cpp, java, or python sikhi or exams me bhi accha perform kia, thanks a lot
I learned scripting and hacking tool making with this course
first one go to harry function in which x = 20 assigned to the x and in the harry function go to rohan function after out from the rohan function and our global variable x = 88 the print statment print the x = 20 because x = 20 is already in harry function so not preference for the global x = 88. and last print x = 88.
Maine galat guess kiya tha first time 89 but fir se video dekha tab smj aaya then 88 ,great bhai jaan apki video tutorial mai daily follow kr raha hu ...
while True:
print("Thankyou Harry Bhai")
never going to break the loop👍👍👍
Edit :
while (True):
print("Thankyou Harry Bhai"
Hamesha ki tarhan zabardast Harry bhai!
now i got the solution of the problem. thanks,
The way you explain is exceptional !!! Thankyou bhaiya❤️.. aapka python full course in hindi wala video dekh ke maine bht kuch sikha... Thankyou once again!!❤️😊🙏
10:44
Value of x will be 88
you are definetly better than mosh
great
moment when he says "Bajao tali" was op...........
Behtreen sir love from Pakistan
x=88 will be printed
(kyuki wo def ke bahar x ko dhundega and change karega ji last me hai)
you get the point.
Literally this video is very helpful for me... you don't believe I've watched this video many times whenever I forgot this topic, and even I've refer this video to many of my friends who often encounter same problem. Really it's amazing and concept clearing video sir....thanks😘😘
10:57
Answer of the quiz 88
because global x=89 and we changed it in our def function into 88
so our answer is 88
quiz answer is 88 because
firstly, it will take 89 as global var,
then, it will call harry(),
then,local value of x will be 20,
then,it will call rohan(),
the global value of x would be 88 now and
print statement within the function will print 20
print statement outside the function will print 88
U are a superb teacher ❤❤❤
God bless u.. u are helping so many people by providing this course..thnku..this lec was really interesting and i understood whtever u taught in this video..thnku so mucch for such videos
Very remindable example to understand this code 🎉
I am also from Nepal
So,helpful video for python
11:01 it will print 88 because you have used global x = 88 function
X will print 88 because we change the value of x by the global keyword
harry bhai me to apke video 2 3 bar dekta hu . thankyou fot yhe video. waiting for your new pytyhon tutorial series
harry bhai ap thora batana please "before calling rohan" kyu 20 ho raha hae, wo to alag funcation me hae .y 20 is printed?
This course is helpful
88 will be printed since we used global keyword in rohan function as it overrites the previous value of x
You are wrong at 9:55 sir the before Rohan() line you have to add one more tab so it goes to Rohan()
Zabarsast smjhate ho bhai. Thank You.
This is fantastic. Thank you so much !
x = 88
def shivansh():
x = 20
def sujal():
global x
x = 88
# print("befor calling sujal ()" , x)
sujal()
print("after calling sujal ()", x)
shivansh()
print(x)
7:28 Harry Bhai be like: mza aa gya toh bajao taali 😂😂
sir 88 output aayega because before the nested function value of x was 89 but in function rohan()
We called global x and then we assigned the value of x to 88
So when we print x then we'd will get 88 as the output
10:55
Quiz answer:
This will print 88 not 89 because we changed the value of global x
Thank You sir.....as the global keyword will change the value in global so the answer will be 88
The Output will be 88 because above the code x = 88 we have written global x which will change the value of the x that is written outside the function the value was 89 but by the global function it will make it 88 and hence the output will be 88
I love ur way of teaching
Sarkar ka paisa example was the best example
Thank u Harry bhaiya
given like 👍to this video
bcoz of explaination
(global means GOVERNMENT,
local means KHUD KA)
ek like toh banta hai
10:58
X = 88
Because ham ne niche
globle x
X = 88
Kar ke globle variable ko change kiya hai
10:56 print(x) will show answer 88
excellent explanation,i found my answer ... thank you sir
88 cause gobal variable (x) value changed by rohan() function
#learningPythonwithharry #codewithharry
sir from inside that is from harry's function we will get x =20 as printed outcome as there was no change in the local variable and when from the rohan's function which changes the external predefined global variable(89) to 88
that is why we get output has:
after calling rohan() 20
88
quiz- answer is 88 because global variable which we create x change the outer global variable x(89) to x(88).
We use global for interchanging local variable . Hence answer is 88.
ALL THANKS TO HARRRY BHAAAAAI!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
hello harry i like your video
i also learn html css js and now py
Thanks for helping us to learn python and many more..
Sir, it will print 88 because in the global variable it is 88 and when it will go up out of the nested function it will find the variable X it's value is 89 so it will change the value to 88
it will print 88 because global variable is defined before..
so **global x** will find x and then change it to 88
first i complete C, C++ of harry sir thats why phython is much more easy to me
Thanks for the brilliant lecture
l = 10
def function1(n):
# l = 5
m = 8
# global l
k = l + 20
print(k, m)
print(n, "What I have Printed")
function1("This is ")
print(l)
bajao taali , hahahahahaha
so nice video Harry bhai
Quiz-6 Answer
Yes 88 will be printed
88 hoga op kyuki rohan wale function me humne use phirse assign karke change kiya "global x" use karke.
best explanation! thnx dude!
x=89
def mintu():
x=20
def Ashish():
global x
x=88
# print("before calling Ashish()",x)
Ashish()
print("after calling Ashish ()",x)
mintu()
print(x)
output is 88
11:05
The value of x will be 88
quiz
itll print 88 because we changed its global value in second function
sir 8:14 me globL ke baad x nhi accept kr raha plz bataye kya problem hui h
Harry. You are awesome man...
Please make videos on Machine Learning, AI, Data science and i would love to learn more about the Jarvis programme other than the one you made.
Sir the output for the
harry() will be 88
because as you mentioned
the global keyword will directly
search for the x out of the
def harry()
and the x = 89
will be changed to x = 88
and the output for it definitely
will be x = 88
I have an example for better understanding.
Let
I am living in my house in apartments.
Akshay Kumar is my family member and his is age 20.
Print(Akshay kumar age)
20
Global ( Bollywood ) Akshay Kumar
Print(Akshay kumar age)
52
If we don't have Akshay kumar in my family but in my apartments.
print (Akshay kumar age) it won't check in apartments(Nested function) for Akshay whether he exist or not. It print global (Bollywood) Akshay kumar age.
52
Output for harry() = 20, 88
Output of x = 89
harry bhai u r the great
Output :
after calling rohan() 20
88
It will print same 88 because the global value given in function it will change the earlier given