Got a question on the topic? Please share it in the comment section below and our experts will answer it for you. For Edureka Python Course curriculum, Visit our Website: bit.ly/2OpzQWw
@ganeshprem30433 жыл бұрын
I loved your lecture. Your presentation is straightforward and efficient. No wasted words. Your students are lucky.
@shreyawafgaonkar52753 жыл бұрын
Hey, I am studying in 7th grade and I am learning python. This video really helped me a lot to understand loops. Thanks :)
@edurekaIN3 жыл бұрын
Hi Shreya, thank you :)
@matthewmckeen23022 жыл бұрын
I've watched Dozens of Python tutorials and this in depth look at loops is the ONLY one that has made me really understand how to use loops! THANK YOU!!!!
@edurekaIN2 жыл бұрын
Hey:) Thank you so much for your sweet words :) Really means a lot ! Glad to know that our content/courses is making you learn better :) Our team is striving hard to give the best content. Keep learning with us -Team Edureka :) Don't forget to like the video and share it with maximum people:) Do subscribe the channel:)
@muhammadaftabzafar60893 жыл бұрын
Your method of teaching is outstanding. i have become a fan of your teaching skills. This lecture was really helpful. Thanks a lot.
@muskanjacob85633 жыл бұрын
really helpful! thanks for this knowledge.♥️
@zenentertaintment5 жыл бұрын
Thanks for the explanation.its very clear for me now.
@edurekaIN5 жыл бұрын
Hey, thanks for watching the video. Do subscribe to our channel and stay connected with us. Cheers!
@paidimarryprithvirakshaksh81534 жыл бұрын
the most useful and completely beginner-friendly video on loops ever. thank you so much
@karanmpallan45513 жыл бұрын
Best explanation for loops and bEST EXPLAINATION FOR ATM MACHINE!!!!
@suryabh23073 жыл бұрын
You rocked it man! Finally I'm with a clear explanation
@edurekaIN3 жыл бұрын
Hi : ) We really are glad to hear this ! Truly feels good that our team is delivering and making your learning easier :) Keep learning with us .Stay connected with our channel and team :) . Do subscribe the channel for more updates : ) Hit the bell icon to never miss an update from our channel : )
@hayatop21246 жыл бұрын
wow its osm channel to lern python... thank you
@edurekaIN6 жыл бұрын
Thank you for watching our video. Do subscribe, like and share to stay connected with us. Cheers :)
@munivenkatesh45306 жыл бұрын
ThankQ for giving this video its really good for us
@edurekaIN6 жыл бұрын
Hey Venkatesh, thank you for watching our video. We are glad to know that you liked our tutorial. Do subscribe and stay connected with us. Cheers :)
@anusmitasamanta26084 жыл бұрын
sir u r extremely good!!! thank you so much for clearing all my doubts! much appreciation :)
@NewfieNL4 жыл бұрын
you are a great teacher
@kavyathakore28233 жыл бұрын
It's really helpful....thank you so much..The explanation was very clear that I was able to understand complex programs easily.
@vasundharakushte36202 жыл бұрын
Hi this is viraj Ur videos cleared my doubt in while loop and for thank u sir. I just cleared 12th and python is very easy language and with it videos it becomes very fluent. Again thank you sir
@edurekaIN2 жыл бұрын
Hi : ) We really are glad to hear this ! Truly feels good that our team is delivering and making your learning easier :) Keep learning with us .Stay connected with our channel and team :) . Do subscribe the channel for more updates : ) Hit the bell icon to never miss an update from our channel : )
@primeplug6189 Жыл бұрын
I have a question please.The logic to generate the random number (n * random.random()) + 1, is this a python code or you created this by yourself. And can someone explain this code to me and how it will generate a random number. I am new and fresh to python. Thanks
@deepakmakhija50475 жыл бұрын
Sir thanks a lot for such a fantastic explanation.
@edurekaIN5 жыл бұрын
Hey Deepak, we are glad you loved the video. Do subscribe to the channel and hit the bell icon to never miss an update from us in the future. Cheers!
@mlittleprogramming7804 жыл бұрын
Great video 👌🏻
@akaez28072 жыл бұрын
excellent work good job👏
@manojsah0070076 жыл бұрын
Amazing Loop concept provided.
@tonygaurav7 жыл бұрын
Thanks Sourav.... Really helped a lot....
@abdoulayebalde21396 жыл бұрын
great video with good explaination
@edurekaIN6 жыл бұрын
Hey Abdoulaye, thank you for watching our video. We are glad that you liked our content. Do subscribe and stay connected with us. Cheers :)
@yogendrasingh-wn5pn4 жыл бұрын
Really helpful for me... Corresponds to currently class 11 course
@edurekaIN4 жыл бұрын
Thanks Yogendra! We are glad that our video was of great help to you. :)
@qaeedrawal98032 жыл бұрын
Thanks Edureka for the explanation of python Language it was very useful
@edurekaIN2 жыл бұрын
We are super happy that Edureka is helping you learn better. Your support means a lot to us and it motivated us to create even better learning content and courses experience for you . Do subscribe the channel for more updates : ) Hit the bell icon to never miss an update from our channel : )
@srikarrar2615 жыл бұрын
in the program about bank in nested loop, i had a doubt in 'restart' option i.e. why it is used and why it has given 'not in' in while loop
@edurekaIN4 жыл бұрын
If restart is not in (a membership operator), the loop will break.
@JyotiPathak2019jcc4 жыл бұрын
Great Sir🙏🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
@MohamedRaffiM3 жыл бұрын
Thank You sir I definitely say edureka is a best learning platform compare to all , once again thank you management and thank you sir .
@edurekaIN3 жыл бұрын
Thanks for watching! Glad you liked it ! We are glad to have learners like you . Do subscribe our channel and hit that bell icon to never miss an video from our channel .
@tarekererajeeva39173 жыл бұрын
Very interesting sir. Well explained. Sir can you explain how to update the database in a loop for the nested calculations
@edurekaIN3 жыл бұрын
Thanks for watching! Glad you liked it ! Definitely ! We are glad to have learners like you .Drop your mail id in the comment section for us to share the data sheets or source codes :) Do subscribe our channel and hit that bell icon to never miss an video from our channel .
@dheerendrasingh66237 жыл бұрын
thanks saurav sir for my help regarding the prob of python
@k.g.goletar6881 Жыл бұрын
I was really confused about the loops before seeing the video now I completely understood it
@edurekaIN Жыл бұрын
Hi : ) We really are glad to hear this ! Truly feels good that our team is delivering and making your learning easier :) Keep learning with us .Stay connected with our channel and team :) . Do subscribe the channel for more updates : ) Hit the bell icon to never miss an update from our channel : )
@manishapriya27033 жыл бұрын
Great teacher
@tahermahmud3053 Жыл бұрын
Bossssssssssss , thank uuuu
@manuk4771 Жыл бұрын
Very helping video
@edurekaIN Жыл бұрын
Thank you 😊 Glad it helped !! and Keep learning with us
@RanbirSingh-ch4lr6 жыл бұрын
Going through your videos and that's a great stuff you provided. But I want to ask that what is the purpose of factorial variable and what if I enter its value other than 1??
@sourabhhole40612 жыл бұрын
Thank you
@dfolks77813 жыл бұрын
iam studying in grade 11 but new for python,actually it is a good video with good lecture all were explained well in short and sweet
@nitinchaudhary76865 жыл бұрын
i didn't understand , n*random.random ( how this works ,and why we use it ?) what if, we use only n*random ?
@edurekaIN4 жыл бұрын
In the example, the import statement does not have an alias, so in order to access the random function we are doing random.random(). For example: if we wrote it as import random as r, we could have written it as r.random().
@mangeshraj8913 Жыл бұрын
loved this video
@edurekaIN Жыл бұрын
Thank you 😊 Glad it was helpful!!
@bhumikabansal36512 жыл бұрын
In the nested for loop code : for a in the range (a ,n+1) and for b in the range (a ,n) why is it ('n+1' for a) and (only 'n' for b )?
@anishafernando652 жыл бұрын
ThankYou
@samyakjain41786 жыл бұрын
sir what is the use of abstract classes in python
@technostrike98045 жыл бұрын
To provide a baseline to build other classes It has at least 1 pure virtual function.
@subernaguhan33325 жыл бұрын
Hello Sir, Great lecture! The examples really helped me understand the concept in depth. Just a quick Q: In the Nested while loop - bank ATM example,(26:14) in the elif option = 2 block, there's an option2='Y' statement. I don't understand why it is written & also seems like the video was cut short while you were explaining that particular block. Can you please re-upload the full video of this tutorial or explain why we use that piece of code? Thank you very much!
@edurekaIN4 жыл бұрын
As, we move forward into the program, it basically shows the other options if were chosen at all, the execution will move in that block. If the option is 2, and option2 = 'Y', the execution will move to this block.
@renujain59664 жыл бұрын
Nice
@onyebuchichukwu74623 жыл бұрын
You're an excellent teacher, but you're a bit fast can you reduce your speed please. I really like your teaching.
@edurekaIN3 жыл бұрын
Thank you for your review : ) We are glad that you found our videos /contents useful . We are also trying our best to further fulfill your requirements and enhance your expirence :)We are sorry for the inconvenience you had to bear.We'll surely take your suggestion in our future videos and updates :) Do subscribe the channel for more updates : ) Hit the bell icon to never miss an update from our channel : )
@sambatuti10542 жыл бұрын
plz explain step by step of every program include example program too plzzz, tq
@edurekaIN2 жыл бұрын
Thanks for showing interest in edureka kindly visit the channel for more videos our content creators are eagerly waiting for your suggestion to make new videos on your interest :) DO subscribe for the video update
@ankitkotnala4 жыл бұрын
At 17:57 after print("current fruit:",fruit) Here after comma it should be fruits i think????? Because above you stated fruits as variable.
@edurekaIN4 жыл бұрын
"Fruit" is used because we are using the 'for loop' to extract one item at a time from the list.
@5_alenrenny567 Жыл бұрын
It help me and i won first place in programming compitition
@edurekaIN Жыл бұрын
Good To know our videos are helping you learn better :) Stay connected with us and keep learning ! Do subscribe the channel for more updates : )
@thilaks58096 жыл бұрын
in your factorial program enter the number -1 it says "must be positive" and also shows 1 on the output screen.. same way if you enter 1 the output is factorial=1 and again types 1....the extra 1 shouldn't be displaying right ?this worked fine for me. please suggestn=int(input("enter a number")) fact=1 if n
@edurekaIN5 жыл бұрын
Hey Thilak, sorry for the delay. Yes, your approach is good. In the video what happens is if a number is not positive it just gives an output as a negative number. Hope this helps!
@mawjal-jadirjy1336 Жыл бұрын
Thanx for this great knowledge and presentation. Can I have this data sheet plz??
@edurekaIN Жыл бұрын
Good to know your learning with Edureka :) please share your mail id to share the data sheet! We'll Update you soon ! Do subscribe our channel for more such videos :)
@thilaks58096 жыл бұрын
this code works the same right import random n=10 correct=int(n*random.random()) while 1: g=int(input("guess your number")) if g>correct: print("you entered greater number") elif g
@edurekaIN6 жыл бұрын
Hey Tilak, yeah pretty much, but it won't terminate (exit the game) once you provide a negative value. Hope this helps :)
@maruthjain58755 жыл бұрын
In while loop part why (n*random.random()) Doesnt it give any number not just a number less then equals to 20? And if its only upto 20 then is this code functioning?
@edurekaIN4 жыл бұрын
It works like a game, where you guess a number. So random fits the function perfectly.
@demonslayer76692 жыл бұрын
why you define withdrawl == 1: because it is the amount i.e. 10 20 30 etc. how it works @ time 27:06
@denniskamonde68367 жыл бұрын
great video
@edurekaIN7 жыл бұрын
Hey Dennis, thanks for checking out our tutorial! We're glad you found it useful. Here's another video that we thought you might like: kzbin.info/www/bejne/b2m8loSmoraYfpo. Do subscribe to our channel to stay posted on upcoming tutorials. Cheers!
@mdraja18365 жыл бұрын
Sir how to reverse an integer using for loop??please tell
@edurekaIN5 жыл бұрын
Hey Raja, "# Python Program to Reverse a Number using While loop Number = int(input(""Please Enter any Number: "")) Reverse = 0 while(Number > 0): Reminder = Number %10 Reverse = (Reverse *10) + Reminder Number = Number //10 print("" Reverse of entered number is = %d"" %Reverse)" Hope this helps!
@divyanshsachdeva2295 Жыл бұрын
good video
@edurekaIN Жыл бұрын
Glad you enjoyed
@vaishnaviventrapragada65366 жыл бұрын
I didn't understand , how it took the correct answer
@mastieditz84322 жыл бұрын
Write a program to take a number (n) as input. Take n names as input and for every name entered, print "Hello" + name. What a code of thise question in while loop
@mahalaxmihiremath14235 жыл бұрын
In the nested loop 1st example what will happen if i use for loop instead while loop
@edurekaIN5 жыл бұрын
Hey Mahalaxmi, "A for loop runs for a pre-determined number of times. So, it can iterate through an array from start to finish, say, but it will only ever loop for that specific number. A while loop will carry on until a pre-determined scenario takes place. That may happen immediately, or it may require a hundred iterations. So, the number of loops is governed by an outcome, not a number." Hope this helps!
@Wow-oz4ym3 жыл бұрын
It's interesting, but the black background put there for the subtitle is oftentimes blocking the output.... That I think is not helping matters. Beside, ur spoken English is clear for 99% of audience to understand. Kip it up👍🏾
@ganeshveer39897 жыл бұрын
I want for loop program on histogram
@edurekaIN4 жыл бұрын
Here is a matplotlib tutorial to learn about plotting graphs such as scatter plots, histogram, etc. - kzbin.info/www/bejne/r4u3c4CDmbWCrdk
@nirajanwagle11322 жыл бұрын
lifesaver
@cookingwithdono71094 жыл бұрын
but why in 13:10 we need to type if guess >1 ? if the user inputs -1 then it means that the user is giving up ? Thanks!
@edurekaIN4 жыл бұрын
It is just a demonstration to show how the control flow works in case a statement turns out to be false.
@rajeevdarla18067 жыл бұрын
In the For loop factorial example: you didn't increment the 'i' value, is it automatically incremented by 1? Don't we need to write like: for i in range(1, num + 1, 1) ? Please explain. Great videos by the way, very clear voice.
@edurekaIN7 жыл бұрын
Hey Rajeev, thanks for checking out our tutorial! We're glad you liked it. With regard to your query, by default, the increment value is 1 in for loop. Hope this helps. Cheers!
@narayanareddy35436 жыл бұрын
if u write range(1,num) suppose num=5 range (1,5) is 1,2,3,4 it wiil end by 4 so range (1,num+1) 1,2,3,4,5=5!
@pradeepkumar-or7go5 жыл бұрын
what if we press n in the code..in nested loops examples ... and why are we using " " in the code...can you please explain
@edurekaIN5 жыл бұрын
Hey Pradeep, You use for a new-line. This is called an escape character. Simply typing n wont help. Hope this helps!
@vyshnavipolepalle55625 жыл бұрын
what is random?.....is that any module, built in function?...could tell more about it and u called random() function too...what does random.random() means and how these two random's are different?
@edurekaIN4 жыл бұрын
Yes, there is a module called as random which is used to generate random numbers. But to use them, we would need to call the random file. That is the reason we import random. Once the random file/module is imported, we need to call the random function, that's the reason we have random.random() where the first random is the built-in file and the second random() is the function to generate the random number.
@darshitagrawal24866 жыл бұрын
In guessing game in 3rd line of code why we are adding 1
@edurekaIN6 жыл бұрын
Hi Darshit, thanks for watching our video. The reason for adding 1 is to make sure that the random number generated is equal to or greater than 1. Here is our complete playlist on Python: kzbin.info/aero/PL9ooVrP1hQOHY-BeYrKHDrHKphsJOyRyu. You can also check out our complete Python course here: www.edureka.co/python. Do subscribe to our channel to stay posted on upcoming tutorials. Hope this helps. Cheers!
@darshitagrawal24866 жыл бұрын
Ok sir thanks for uploading such a nice video
@arihantsaxena47575 жыл бұрын
Why have we used count=count+1 in while loop?
@edurekaIN5 жыл бұрын
Hey Saxena! Its there to increase the counter variable by 1. So, in the while loop, since we want a set of actions to be executed till the condition is satisfied. we use this counter variable to iterate to each and every step. Hope this helps!
@nitinchaudhary76865 жыл бұрын
why do we use , +1 ( count = count +1 ) ?
@edurekaIN4 жыл бұрын
count += 1, it means the same as writing count = count + 1
@atitchauhan65635 жыл бұрын
Python
@soniasardana89654 жыл бұрын
Sir i have doubt in nested for loops
@soniasardana89654 жыл бұрын
How nested for loop works can ecplain
@edurekaIN4 жыл бұрын
A nested loop is a loop within a loop, an inner loop within the body of an outer one. How this works is that the first pass of the outer loop triggers the inner loop, which executes to completion. Then the second pass of the outer loop triggers the inner loop again. This repeats until the outer loop finishes. Hope that solves your query.
@dakshbhardwaj71895 жыл бұрын
Have a Doubt.. sir...
@edurekaIN5 жыл бұрын
Hey Vidushi, please feel free to ask your doubts over here.
@veerraghavareddy7356 жыл бұрын
num=int(input("enter any number")) for s in range(num): if(s/2==0) print(s) The output of this program is showing none .please explain why output us showing none
@edurekaIN4 жыл бұрын
Let's suppose you enter the num as 6, then s will be (0,1,2,3,4,5). And the statement will be true for 2. and it will print 2.
@rajatji4 жыл бұрын
to_be_guessed=int(n*random.random())+1 what does this line mean? 14:23
@edurekaIN4 жыл бұрын
random(): Generates a random float number between 0.0 to 1.0
@curiousbit92286 жыл бұрын
@34:00 how can one be sure that c is less than n??
@edurekaIN4 жыл бұрын
C is basically square root of sum of two numbers a and b. Hence it will be greater.
@curiousbit92286 жыл бұрын
@24:17 chances >= 0, doesn't it mean there are 4 chances in total and not 3. that is for each number 3,2,1,0 ??
@edurekaIN4 жыл бұрын
There is a block that states, if chances == 0, it will print "no more tries".
@suneetachauhan19844 жыл бұрын
## Why the below command does not move the cursor to the end of the statement? print('welcome to the bank') count = 3 while count >= 0: pin = int(input('enter the pin :')) if pin == 1234: print('the correct pin',end=' ') break elif pin!= ('1234'): print('incorrect pin') count -= 1 if count == 0: print(' please collect your card') break
@edurekaIN4 жыл бұрын
Looking at the code, the execution will go on until the count is 0, that means you will be able to give the pin 3 times. In the incorrect pin statement there is no break statement. so the loop continues to execute the next statements.
@vickykumar58554 жыл бұрын
I have doubt on the third line of code?
@edurekaIN4 жыл бұрын
doing int('123') returns an instance of an int object. However, (in standard Python aka CPython) for small integers (in the range -5 to 256, inclusive) the int constructor doesn't actually build a new integer object.
@cookingwithdono71094 жыл бұрын
is it mean that we cannot name our file to 'random' ?
@edurekaIN4 жыл бұрын
You can follow the python filename naming conventions here in the official documentation- www.python.org/dev/peps/pep-0008/
@Siri-qh6vl Жыл бұрын
Ok
@SaimDiscoveries6 жыл бұрын
I do not understand that what is the purpose of this line "to_be_guessed =int(n*random.random())+1"
@edurekaIN5 жыл бұрын
Hey, sorry for the delay. """to_be_guessed =int(n*random.random())+1"" is used to keep the range of the number between 1 and 20. random.random() gives you a random number less than zero in floating point Ex: print (random.random()) will give 0.95795482028667 as output, which is less than zero and not suitable for our code. n*random.random() is done so that when another number is multiplied with the random number generated, the value becomes more than zero. But suppose n=1, then n*random.random() will give the same number that is less than 1. To avoid this, we add 1 to n*random.random(). Finally, (n*random.random())+1 will result in a number greater than 0 and less than or equal to 20. And then this number is converted to int type from float. Hence, we use the line ""to_be_guessed =int(n*random.random())+1""" Hope this helps!
@vickykumar58554 жыл бұрын
The third line of code why u use convert in int? that's already int ??????
@edurekaIN4 жыл бұрын
doing int('123') returns an instance of an int object. However, (in standard Python aka CPython) for small integers (in the range -5 to 256, inclusive) the int constructor doesn't actually build a new integer object.
@annamdurgashivaprasad95936 жыл бұрын
Sir, plz help me In game guessing program I didn't see 13, where it is defined but when we run &give new number 13 it shows congratulations. How?
@edurekaIN5 жыл бұрын
Hey Annam, sorry for the delay. Check for proper the indentation. Python using indents to create blocks so if your code is not properly indented under the right condition/loop, you might not get the expected result. Please share your code to this email id: social.media@edureka.co so that we can help you better. Thanks!
@vedantmaurya74974 жыл бұрын
Sir, can we use Import math instead of using import random
@edurekaIN4 жыл бұрын
We can use the math module too, but in that case the random number to be guessed will no longer be a random number.
@fathoorchisty95197 жыл бұрын
i got into a problem in atm programme .........when it asked me would you like to go back? if i say yes it breaks the loop........ if i say no then it comes back to entering pin then i give the pin and it came back for enter pin and i gave the pin and it happens always so what should i do??
@edurekaIN4 жыл бұрын
You can change the logic in the block so that when you enter no, so that it would take the execution to the desired block .
@saranyathiyagarajan4397 жыл бұрын
why post loops not present in python
@edurekaIN4 жыл бұрын
We can emulate a do-while like a loop in python as well. Here is small example - i = 1 while True: print(i) i = i + 1 if(i > 3): break
@anitakumawat81036 жыл бұрын
but sir you don't create any fruit type variable and then how you put fruit keyword on variable place?
@edurekaIN4 жыл бұрын
It is like writing for i in range(10): print(i). So i here is basically all the elements in the range function from 0-9.
@preetirai2554 жыл бұрын
@@edurekaIN good
@anitakumawat81036 жыл бұрын
sir how the random function work?
@edurekaIN4 жыл бұрын
random.random(): Generates a random float number between 0.0 to 1.0. The function doesn't need any arguments.
@nitesh7324776 жыл бұрын
my pycharm is not showing math why?
@edurekaIN4 жыл бұрын
Try to install math using pip or add it from the project interpreter.