While loops in Python are easy ♾️

  Рет қаралды 292,977

Bro Code

Bro Code

Күн бұрын

#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
@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
@rm-vo5zu Жыл бұрын
thank u soo much bro for the video as well as the code here☝
@alexak8671
@alexak8671 Жыл бұрын
Thank you for your efforts 🤩!!
@christopherbermudez1528
@christopherbermudez1528 Жыл бұрын
You explained this so clearly. Easiest “while” video to understand for me thus far. Liked.
@buenolvr
@buenolvr Жыл бұрын
This*
@simonaubrey6326
@simonaubrey6326 10 ай бұрын
@@buenolvrthus is grammatically correct here
@iSwearToCod
@iSwearToCod 9 ай бұрын
@@buenolvr if it said this it would be incorrect. dafuq
@billalkhwaja851
@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
@pirunnyrkki518
@pirunnyrkki518 9 ай бұрын
This was the best explanation video so far that i found. And probably the best Coding based teaching YT I have came across.
@saturncosmos
@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
@buenolvr Жыл бұрын
are u a computer
@sparkcodez
@sparkcodez 11 ай бұрын
​@@buenolvr 😂
@jiyonn9902
@jiyonn9902 Жыл бұрын
you are really a Bro for teaching us while loop and making it looks so easy thanks !
@ssigitas69
@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
@moniquebrasilbaptista1989 Жыл бұрын
Thank you for the easy and clear explanation! Loved it!
@Iskm.28
@Iskm.28 5 ай бұрын
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
@LA-cy1zj Жыл бұрын
that explanation was so good I transcribed some of it for my notes verbatim!
@dhruvaraj4704
@dhruvaraj4704 7 ай бұрын
I've been working on this from months and you made me understand in minutes 😍
@focuz24
@focuz24 Жыл бұрын
Thanks!! I stuck in while loop as well. Now I understand how it works.
@fluffypieee
@fluffypieee 5 ай бұрын
What an informative video!! I find this video super helpful with such clear explanations!! Thank yoou so much!
@abdulserwanga6946
@abdulserwanga6946 5 ай бұрын
Following from Uganda , This is the best explanation have received . finally understood while loops
@LilJollyJoker
@LilJollyJoker 6 ай бұрын
Finally, an easy explanation! Thank you!
@evan._.7436
@evan._.7436 9 ай бұрын
Thanks for the help, much better than coursera's courses, and their explanation on loops in general. Subscribed!
@lopexaaz.kitchen628
@lopexaaz.kitchen628 4 ай бұрын
Best Vid to understand the while Loop. Great job
@crimsonphoenix8907
@crimsonphoenix8907 2 ай бұрын
man you explained this so clearly it makes me wonder why I’m having so much difficulty with it
@anxures7412
@anxures7412 8 ай бұрын
The best video to explain the while loop ever
@Dragonis91
@Dragonis91 9 ай бұрын
Such a good video!! Thank you so much for this tutorial it helped a lot.
@senpaigt911
@senpaigt911 Жыл бұрын
Thank you to help us improve our programing
@rhapsody1819
@rhapsody1819 Жыл бұрын
Thanks bro! You're helping me a lot
@jameswilliam2072
@jameswilliam2072 5 ай бұрын
simple yet very clear and easy to understand.. thank you so much
@CyberTronics
@CyberTronics 9 ай бұрын
Finally a video that explains it from scratch with easy examples rather than rocket science
@MateusLima-iu5wc
@MateusLima-iu5wc Ай бұрын
bro, i love you. you literally did just saved me
@DenshaOtoko2
@DenshaOtoko2 6 ай бұрын
This makes so much sense now. Thank you Bro Code.
@alexak8671
@alexak8671 Жыл бұрын
Thank you for the clear explanation 🤩!!
@jeshy9810
@jeshy9810 Жыл бұрын
Thank you! You're a great teacher!
@adailsoncarlos3122
@adailsoncarlos3122 16 күн бұрын
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_love
@Native_love 11 ай бұрын
Beautiful! YOU ARE THE BEST!!!
@bilal.rk09
@bilal.rk09 Жыл бұрын
You are one of the best tutor in youtube for Python tutorials.
@buenolvr
@buenolvr Жыл бұрын
i can show u a toutoriaalalaalal
@joeprodebadezt217
@joeprodebadezt217 9 ай бұрын
This is the best explanation ive had
@MRCLEEN
@MRCLEEN Жыл бұрын
I now understand while loops better after watching this thank you
@myeducationvlogs8483
@myeducationvlogs8483 Жыл бұрын
You became my favourite coder and teacher💯❤️🤝😊
@josephaddae7598
@josephaddae7598 Ай бұрын
its proggraming!!
@dishant_7
@dishant_7 23 күн бұрын
You made it so easy . Thanks bro ❤
@Vronsky1997
@Vronsky1997 10 ай бұрын
Big thank you for your excellent video!
@lesclart
@lesclart Жыл бұрын
thanks for teaching me the WoW loop :)
@vortback
@vortback 11 ай бұрын
BEST TUTORIAL EVER! THANK YOU SO MUCH MY EXAM IS TOMMOROW
@cse-17akashkumar32
@cse-17akashkumar32 Жыл бұрын
You are doing a great work
@golamkibriaofficial320
@golamkibriaofficial320 2 ай бұрын
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-we7gq1zy4o
@user-we7gq1zy4o 4 ай бұрын
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
@serdanaksunger2942
@serdanaksunger2942 4 ай бұрын
you are the only one in yt who explain correctly
@TheJGX20
@TheJGX20 3 ай бұрын
I'm not even learning python, this is just good programming explanation, thank you!
@kaitlinespinal5300
@kaitlinespinal5300 2 ай бұрын
This tutorial helped so much with understansding the for while loop
@vaibhavmalhotra4855
@vaibhavmalhotra4855 Ай бұрын
I've been in tech studies for long time but now I came to fully understand how while loop works
@amrhassan8137
@amrhassan8137 4 ай бұрын
Thank you for making it simple.
@cvreddy4574
@cvreddy4574 2 ай бұрын
Thanks man!! It's a good explanation
@affable.pebble
@affable.pebble 4 ай бұрын
This is pretty fun, thanks!
@CodeSyntax0101
@CodeSyntax0101 5 ай бұрын
Bro. Now this is bro code. You are a good teacher👌👌👌👌
@mirarzk222
@mirarzk222 11 ай бұрын
in love! finally i understand while !!
@LovelyJordy
@LovelyJordy 7 ай бұрын
This was great thank you.
@abdulmalikhakimi989
@abdulmalikhakimi989 Жыл бұрын
This was fu***king awesome and understandable thank you so much ❤
@josetijerino5198
@josetijerino5198 24 күн бұрын
thanks for making this easy to understand.
@mrrelm5949
@mrrelm5949 Жыл бұрын
thanks to you i undrstand this while loop thank you so much
@user-ly5we6xl4v
@user-ly5we6xl4v 5 ай бұрын
NICELU DONE BRO...❤
@mari23ification
@mari23ification 2 ай бұрын
Thank you very much for doing this.
@takeactions
@takeactions Жыл бұрын
You are really a Master.
@yns9407
@yns9407 7 ай бұрын
you saved some lives here
@mayurkanth6987
@mayurkanth6987 Жыл бұрын
Best Bro 😀
@Uberdurden
@Uberdurden 7 ай бұрын
good work bro!
@GearheadModding
@GearheadModding 8 ай бұрын
thanks super helpful
@benevolentnkrumah4427
@benevolentnkrumah4427 Жыл бұрын
I love you.. even this is not on Google.. thanks Bro Code
@Poem_AI
@Poem_AI 8 ай бұрын
Thanks, Bro! ... Subscription is on the way!
@ashishraj9850
@ashishraj9850 Жыл бұрын
Thanks bro 🤜
@HebaZainab-wg5dk
@HebaZainab-wg5dk 6 ай бұрын
You explained soo clearly , i have a test tomorrow on this chapter and this video helped a lot , thankyou
@bobbye8964
@bobbye8964 6 ай бұрын
good luck on your test. i got exam in jan coming up for coding in python.
@dnzz453
@dnzz453 Жыл бұрын
This vid was soo easy and fun thanks
@born2die841
@born2die841 Жыл бұрын
helpfull thanks :)
@TypicalVole2437
@TypicalVole2437 Жыл бұрын
this was easy thanks bro
@farahbaliki4680
@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
@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.
@Iamandrey
@Iamandrey 4 ай бұрын
you are awesome! thanks a lot!
@ahmadrandhawa238
@ahmadrandhawa238 Жыл бұрын
Good one sir
@abolfazlzare-xx7gw
@abolfazlzare-xx7gw Сағат бұрын
love you bro👾
@user-lt5ew6xx9w
@user-lt5ew6xx9w 7 ай бұрын
How can it be so easy!!! thanks a lot!
@anonymous-vu2vo
@anonymous-vu2vo 9 ай бұрын
I finally understood while loops 🤣😄
@vizcarraorozco4740
@vizcarraorozco4740 5 ай бұрын
awesome!!!! Thanks!!!!
@Jerrymiah1
@Jerrymiah1 Жыл бұрын
Bro code > You just earned my sub
@theamithsingh
@theamithsingh 17 күн бұрын
bro before ho definitely! 💪
@omex469
@omex469 6 ай бұрын
Thanks man!!
@riccardoholder6378
@riccardoholder6378 28 күн бұрын
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")
@mesharifahad7479
@mesharifahad7479 7 ай бұрын
Hello everyone I want to know what type of note is he using for python please
@madhusudhanchinnala1986
@madhusudhanchinnala1986 Жыл бұрын
Great 🎉
@youssefmarak1511
@youssefmarak1511 7 ай бұрын
thank u very much
@nikkukohan522
@nikkukohan522 9 ай бұрын
muuuch obliged
@Monkeytrix29
@Monkeytrix29 Жыл бұрын
How would I use this in a def function?
@NanaKwameAE
@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
@AbdulRaffayOfficial
@AbdulRaffayOfficial 8 ай бұрын
if you put the command again of asking names
@jwl796
@jwl796 4 ай бұрын
nice video❤
@hishamdebis9490
@hishamdebis9490 25 күн бұрын
Great
@Ghostlynotme445
@Ghostlynotme445 4 ай бұрын
You need put this whole python videos to compilation so we know tools about python
@Cp_elisha
@Cp_elisha 5 ай бұрын
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-xk9to
@KakashiHatake-xk9to 5 ай бұрын
Which code editor do you use?
@omarlg1907
@omarlg1907 9 ай бұрын
you explained this 100000000000000000x better than the instructor on free code camp!! you rock!!!
@Eastcoast_Rds
@Eastcoast_Rds Жыл бұрын
Great vid
@suyashpawar5873
@suyashpawar5873 5 ай бұрын
Brocode is really a big bro❤
@shaswatachowdhury9032
@shaswatachowdhury9032 3 ай бұрын
Thanks a lot
@yaseenijaz1473
@yaseenijaz1473 10 ай бұрын
what is the use of f string ?
@jbrdeblij
@jbrdeblij 5 ай бұрын
How to rember everything in coding if i learn something new after a few weeks i'm alreading forgeting it
@ZenZangetsu
@ZenZangetsu Ай бұрын
Thank you
@devilwatcher5766
@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
@nothuman2915
@nothuman2915 11 ай бұрын
why do we use f? can you explain?
@PaninBoateng-ww5qu
@PaninBoateng-ww5qu 9 ай бұрын
What is an f string
Functions in Python are easy 📞
10:38
Bro Code
Рет қаралды 360 М.
Nested loops in Python are easy ➿
5:35
Bro Code
Рет қаралды 247 М.
Stupid man 👨😂
00:20
Nadir Show
Рет қаралды 25 МЛН
While Loop in Python (Perform a Task 1000000 times With Ease) #8
10:12
Python Tutorial 30: Dictionaries And While Loops
6:25
Hank The Tank
Рет қаралды 4,1 М.
This is Why Programming Is Hard For you
10:48
The Coding Sloth
Рет қаралды 447 М.
25 nooby Python habits you need to ditch
9:12
mCoding
Рет қаралды 1,7 МЛН
For loops in Python are easy 🔁
5:06
Bro Code
Рет қаралды 223 М.
Python lists, sets, and tuples explained 🍍
15:06
Bro Code
Рет қаралды 213 М.
3 PYTHON AUTOMATION PROJECTS FOR BEGINNERS
17:00
Internet Made Coder
Рет қаралды 1,4 МЛН
Python 101: Learn the 5 Must-Know Concepts
20:00
Tech With Tim
Рет қаралды 1 МЛН