#python #tutorial #course while loop = execute some code WHILE some condition remains true 00:00:00 intro 00:00:50 example 1 00:01:50 infinite loop 00:02:25 example 2 00:03:39 example 3 00:05:08 example 4 00:06:35 conclusion
Пікірлер: 183
@BroCodez Жыл бұрын
#while loop = perform some code WHILE some condition remains true # ---------------- EXAMPLE 1 ---------------- name = input("Enter your name: ") while name == "": print("You did not enter your name!") name = input("Enter your name: ") print(f"Hello {name}") # ---------------- EXAMPLE 2 ---------------- age = int(input("Enter your age: ")) while age < 0: print("Age can't be negative") age = int(input("Enter your age: ")) print(f"You are {age} years old") # ---------------- EXAMPLE 3 ---------------- food = input("Enter a food you like (q to quit): ") while not food == "q": print(f"You like {food}") food = input("Enter another food you like (q to quit): ") print("bye") # ---------------- EXAMPLE 4 ---------------- num = int(input("Enter a # between 1 - 10: ")) while num < 1 or num > 10: print(f"{num} is not valid") num = int(input("Enter a # between 1 - 10: ")) print(f"You picked the number {num}")
@rm-vo5zu Жыл бұрын
thank u soo much bro for the video as well as the code here☝
@alexak8671 Жыл бұрын
Thank you for your efforts 🤩!!
@christopherbermudez1528 Жыл бұрын
You explained this so clearly. Easiest “while” video to understand for me thus far. Liked.
@buenolvr Жыл бұрын
This*
@simonaubrey632610 ай бұрын
@@buenolvrthus is grammatically correct here
@iSwearToCod9 ай бұрын
@@buenolvr if it said this it would be incorrect. dafuq
@billalkhwaja851 Жыл бұрын
Thank you very much, this is the first time I have actually completely understood how to implement a while loop without having to deal with infinite responses. Your video was great and helped a lot. Cheers
@pirunnyrkki5189 ай бұрын
This was the best explanation video so far that i found. And probably the best Coding based teaching YT I have came across.
@saturncosmos Жыл бұрын
Thank you so much for this video! I have been stuck on while loops for two days. I understand it so much more now. You rock!
@buenolvr Жыл бұрын
are u a computer
@sparkcodez11 ай бұрын
@@buenolvr 😂
@jiyonn9902 Жыл бұрын
you are really a Bro for teaching us while loop and making it looks so easy thanks !
@ssigitas69 Жыл бұрын
Wow. Thats what I needed!!!! I am learning and learning loops and anyway can't understand how it's works. Maybe now I will. Thanks Bro! Now I need to find you video for for loop as well ;)
@moniquebrasilbaptista1989 Жыл бұрын
Thank you for the easy and clear explanation! Loved it!
@Iskm.285 ай бұрын
Thanks! This has been the best and easiest tutorial for me to understand 👏 The explanation is quit simple and clear to the point. 🔥
@LA-cy1zj Жыл бұрын
that explanation was so good I transcribed some of it for my notes verbatim!
@dhruvaraj47047 ай бұрын
I've been working on this from months and you made me understand in minutes 😍
@focuz24 Жыл бұрын
Thanks!! I stuck in while loop as well. Now I understand how it works.
@fluffypieee5 ай бұрын
What an informative video!! I find this video super helpful with such clear explanations!! Thank yoou so much!
@abdulserwanga69465 ай бұрын
Following from Uganda , This is the best explanation have received . finally understood while loops
@LilJollyJoker6 ай бұрын
Finally, an easy explanation! Thank you!
@evan._.74369 ай бұрын
Thanks for the help, much better than coursera's courses, and their explanation on loops in general. Subscribed!
@lopexaaz.kitchen6284 ай бұрын
Best Vid to understand the while Loop. Great job
@crimsonphoenix89072 ай бұрын
man you explained this so clearly it makes me wonder why I’m having so much difficulty with it
@anxures74128 ай бұрын
The best video to explain the while loop ever
@Dragonis919 ай бұрын
Such a good video!! Thank you so much for this tutorial it helped a lot.
@senpaigt911 Жыл бұрын
Thank you to help us improve our programing
@rhapsody1819 Жыл бұрын
Thanks bro! You're helping me a lot
@jameswilliam20725 ай бұрын
simple yet very clear and easy to understand.. thank you so much
@CyberTronics9 ай бұрын
Finally a video that explains it from scratch with easy examples rather than rocket science
@MateusLima-iu5wcАй бұрын
bro, i love you. you literally did just saved me
@DenshaOtoko26 ай бұрын
This makes so much sense now. Thank you Bro Code.
@alexak8671 Жыл бұрын
Thank you for the clear explanation 🤩!!
@jeshy9810 Жыл бұрын
Thank you! You're a great teacher!
@adailsoncarlos312216 күн бұрын
Bro, i just spend a lot of time searching how to exit a while loop with one key and did not finding anything that make some sense to me and you explained it in six minutes, thanks a lot!
@Native_love11 ай бұрын
Beautiful! YOU ARE THE BEST!!!
@bilal.rk09 Жыл бұрын
You are one of the best tutor in youtube for Python tutorials.
@buenolvr Жыл бұрын
i can show u a toutoriaalalaalal
@joeprodebadezt2179 ай бұрын
This is the best explanation ive had
@MRCLEEN Жыл бұрын
I now understand while loops better after watching this thank you
@myeducationvlogs8483 Жыл бұрын
You became my favourite coder and teacher💯❤️🤝😊
@josephaddae7598Ай бұрын
its proggraming!!
@dishant_723 күн бұрын
You made it so easy . Thanks bro ❤
@Vronsky199710 ай бұрын
Big thank you for your excellent video!
@lesclart Жыл бұрын
thanks for teaching me the WoW loop :)
@vortback11 ай бұрын
BEST TUTORIAL EVER! THANK YOU SO MUCH MY EXAM IS TOMMOROW
@cse-17akashkumar32 Жыл бұрын
You are doing a great work
@golamkibriaofficial3202 ай бұрын
This was really an interesting video in term of learning python and whole the tutorial is really appreciated just for helping us giving detailed information........................................
@user-we7gq1zy4o4 ай бұрын
Thank you very much now I'm learning data science course it will be more useful for me to understand the python programming language very easily
@serdanaksunger29424 ай бұрын
you are the only one in yt who explain correctly
@TheJGX203 ай бұрын
I'm not even learning python, this is just good programming explanation, thank you!
@kaitlinespinal53002 ай бұрын
This tutorial helped so much with understansding the for while loop
@vaibhavmalhotra4855Ай бұрын
I've been in tech studies for long time but now I came to fully understand how while loop works
@amrhassan81374 ай бұрын
Thank you for making it simple.
@cvreddy45742 ай бұрын
Thanks man!! It's a good explanation
@affable.pebble4 ай бұрын
This is pretty fun, thanks!
@CodeSyntax01015 ай бұрын
Bro. Now this is bro code. You are a good teacher👌👌👌👌
@mirarzk22211 ай бұрын
in love! finally i understand while !!
@LovelyJordy7 ай бұрын
This was great thank you.
@abdulmalikhakimi989 Жыл бұрын
This was fu***king awesome and understandable thank you so much ❤
@josetijerino519825 күн бұрын
thanks for making this easy to understand.
@mrrelm5949 Жыл бұрын
thanks to you i undrstand this while loop thank you so much
@user-ly5we6xl4v5 ай бұрын
NICELU DONE BRO...❤
@mari23ification2 ай бұрын
Thank you very much for doing this.
@takeactions Жыл бұрын
You are really a Master.
@yns94077 ай бұрын
you saved some lives here
@mayurkanth6987 Жыл бұрын
Best Bro 😀
@Uberdurden7 ай бұрын
good work bro!
@GearheadModding8 ай бұрын
thanks super helpful
@benevolentnkrumah4427 Жыл бұрын
I love you.. even this is not on Google.. thanks Bro Code
@Poem_AI8 ай бұрын
Thanks, Bro! ... Subscription is on the way!
@ashishraj9850 Жыл бұрын
Thanks bro 🤜
@HebaZainab-wg5dk6 ай бұрын
You explained soo clearly , i have a test tomorrow on this chapter and this video helped a lot , thankyou
@bobbye89646 ай бұрын
good luck on your test. i got exam in jan coming up for coding in python.
@dnzz453 Жыл бұрын
This vid was soo easy and fun thanks
@born2die841 Жыл бұрын
helpfull thanks :)
@TypicalVole2437 Жыл бұрын
this was easy thanks bro
@farahbaliki4680 Жыл бұрын
I've been finding it so difficult when it comes to while loops, you made this so easy thank you! But is it not necessary to use else: statement??
@ashkira73 Жыл бұрын
Not necessarily. if a while loop exits due to the condition being false, the upcoming lines of code will be executed. Loops can either be exited with the while condition being false, or with the help of 'break' #example: i=1 while i in range(6): print(i) i+=1 if i==6: break else: print("no break") In this code, since break is used to exit the loop, the else statement doesn't get executed. but if the if block is commented out, you could see that it runs the else statement after the loop gets exited.
@Iamandrey4 ай бұрын
you are awesome! thanks a lot!
@ahmadrandhawa238 Жыл бұрын
Good one sir
@abolfazlzare-xx7gw4 сағат бұрын
love you bro👾
@user-lt5ew6xx9w7 ай бұрын
How can it be so easy!!! thanks a lot!
@anonymous-vu2vo9 ай бұрын
I finally understood while loops 🤣😄
@vizcarraorozco47405 ай бұрын
awesome!!!! Thanks!!!!
@Jerrymiah1 Жыл бұрын
Bro code > You just earned my sub
@theamithsingh17 күн бұрын
bro before ho definitely! 💪
@omex4696 ай бұрын
Thanks man!!
@riccardoholder637828 күн бұрын
thanks for making this video, name = input("Please enter your name and no symbols or number: ") while name.isalpha() == False: print("You have either enter a number or symbol in your name, please try again:") name = input("Please enter your name and no symbols or number: ") else: print(f"Hello there {name}, thank you for following instructions")
@mesharifahad74798 ай бұрын
Hello everyone I want to know what type of note is he using for python please
@madhusudhanchinnala1986 Жыл бұрын
Great 🎉
@youssefmarak15117 ай бұрын
thank u very much
@nikkukohan5229 ай бұрын
muuuch obliged
@Monkeytrix29 Жыл бұрын
How would I use this in a def function?
@NanaKwameAE Жыл бұрын
So basically for example one if the user does not input their name, the while loop will keep asking for the user name until the condition is true and print out hello to the user
@AbdulRaffayOfficial8 ай бұрын
if you put the command again of asking names
@jwl7964 ай бұрын
nice video❤
@hishamdebis949025 күн бұрын
Great
@Ghostlynotme4454 ай бұрын
You need put this whole python videos to compilation so we know tools about python
@Cp_elisha5 ай бұрын
thank u so much this video explained clear but can u help me explain why when i'm writing nested while not working ? please can u help please
@KakashiHatake-xk9to5 ай бұрын
Which code editor do you use?
@omarlg19079 ай бұрын
you explained this 100000000000000000x better than the instructor on free code camp!! you rock!!!
@Eastcoast_Rds Жыл бұрын
Great vid
@suyashpawar58735 ай бұрын
Brocode is really a big bro❤
@shaswatachowdhury90323 ай бұрын
Thanks a lot
@yaseenijaz147310 ай бұрын
what is the use of f string ?
@jbrdeblij5 ай бұрын
How to rember everything in coding if i learn something new after a few weeks i'm alreading forgeting it
@devilwatcher5766 Жыл бұрын
Try this---------------> age = int(input("Enter your age: ")) age = int(input("Enter your age: ")) while age < 0: print("Age can't be negative") age = int(input("Enter your age: ")) if age>100: print("Its not possible to live than that!") elif age