Тёмный

For loops in Python are easy 🔁 

Bro Code
Подписаться 2,2 млн
Просмотров 322 тыс.
50% 1

Опубликовано:

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 129   
@BroCodez
@BroCodez Год назад
# for loops = execute a block of code a fixed number of times. # You can iterate over a range, string, sequence, etc. # ---------------- EXAMPLE 1 ---------------- for x in range(1, 11): print(x) # ---------------- EXAMPLE 2 ---------------- for x in reversed(range(1, 11)): print(x) print("Happy New Year!") # ---------------- EXAMPLE 3 ---------------- for x in range(1, 11, 2): print(x) # ---------------- EXAMPLE 4 ---------------- credit_card = "1234-5678-9012-3456" for x in credit_card: print(x) # ---------------- CONTINUE ---------------- for x in range(1, 21): if x == 13: continue else: print(x) # ---------------- BREAK ---------------- for x in range(1, 21): if x == 13: break else: print(x)
@doober.43
@doober.43 Год назад
hi
@relentlesshvh
@relentlesshvh Год назад
Hey bro, I don’t know if you would have the time to do this. But PLEASE could you do a lua guide from scratch. There are barley any tutorials on YT. And none of them are very good. All I ask is just for around an hour course. But more would be a bonus
@ShivamKumar-rz7uv
@ShivamKumar-rz7uv 11 месяцев назад
bro code -- range star pattern !!!!
@AmnaRajnaz
@AmnaRajnaz 2 месяца назад
Yes..scratch would be helpful!🙏😿
@AdityaPandya-l6n
@AdityaPandya-l6n 12 дней назад
Thanks from india bro
@jespero94
@jespero94 11 дней назад
Really big thanks for your videos. Subbed! Trying to learn python and its not easy when our techer is not the best ;)
@Qtaro-oh
@Qtaro-oh Год назад
You got me into programming
@droneit7961
@droneit7961 3 месяца назад
are you still in programming?
@Qtaro-oh
@Qtaro-oh 3 месяца назад
@@droneit7961 i still am but i stopped for months because i have a final exam and i’ll finally graduate ;))
@Iamtwohundredtwentyfive
@Iamtwohundredtwentyfive 2 месяца назад
Im also wondering, still grinding?
@Qtaro-oh
@Qtaro-oh 2 месяца назад
I don’t know if this is considered programming but after a very long while of learning python and c++ i recently decided to start developing a roblox game in Lua (which im doing at this very moment while typing this reply)
@factlist07
@factlist07 Месяц назад
​@@Qtaro-oh you learning loops logic and developed a game?
@Hamyto41664
@Hamyto41664 2 месяца назад
bro's a gigachad, physically and mentally
@edikblank3759
@edikblank3759 Год назад
biggest gigachad because: A) Amazing tutorial B) Said tutorial is absolutely free C) Flat out refuses donations and says no give to a charity D) Has the gigachad picture in his pfp
@Nk_Lifestyle1
@Nk_Lifestyle1 Год назад
Welp that made my understanding more clearer, at first I was on a course learning for loops and implementing it Into real situations like a website or software and I was confused but once I saw this it made the understanding of it easier thank you
@En1gma2u
@En1gma2u 11 месяцев назад
Best explanation and easy to understand. Thank you!!
@Draurore
@Draurore 8 месяцев назад
i just need to say thank you, i have a programming exam tomorrow and your videos are saving my life
@AmanNgmOP
@AmanNgmOP Год назад
Can you guys imagine this legend made me master in python, and in school, students of my grade are just learning simple things of python
@fustt2426
@fustt2426 Год назад
great
@stanislawignacy
@stanislawignacy Год назад
bro that's even better than yout 12-hour tutorial piece. I had a small doubts how range can be iterated but now I understand it!
@vaibhavmalhotra4855
@vaibhavmalhotra4855 5 месяцев назад
""" Here I have added while loop in the nested for loops So if the user type a letter or a number, it will ask you to type a symbol instead Yes I have changed the variable from rows and columns to length and breadth respectively to relate this code more to Math """ #Print a rectangle using symbols print("Rectangle using symbols") length = int(input("Enter number of symbols you want horizontally: ")) breadth = int(input("Enter the number of symbols you want vertically: ")) symbol = str(input("Enter the symbol: ")) for x in range(breadth): for y in range(length): while symbol.isalpha() or symbol.isdigit(): # While condition if the user type any letter or number then the loop will run symbol = str(input("Enter the symbol not a letter from alphabet or a number: ")) print(symbol, end="") print()
@lifetolive5149
@lifetolive5149 Год назад
Bro code is always bro friendly -_-
@julialouise969
@julialouise969 Месяц назад
Thank u so much for this video. I was having trouble for understanding this function with my professor's videos. You explained it so well.
@김두현-s8p
@김두현-s8p День назад
Thank you! Im taking python course by myself but 100 day python instructor didnt explain well. This makes me understand superbly well!
@grey8854
@grey8854 7 дней назад
Finally! Someone who gets straight to the point!
@dennisderekas4005
@dennisderekas4005 23 дня назад
question:at 4:22 you have written ''else:'' wich i tried not to write it and see what happens.Nothing changed,so why did you write it (i am asking because of curiosity)
@MegaKrendelek
@MegaKrendelek 10 дней назад
hi! can you please tell how to use for i in range (a, b) and write all decimals between a and b please. I don't understand cause a and b can be only integer, how can i write all decimals (that is a float) between a and b? Thank you !
@lakshmisaikrishnapachipulu5713
@lakshmisaikrishnapachipulu5713 15 дней назад
why do I feel guilty for not paying and getting this for free. No cap 10x btr than most payed python courses
@GaryChike
@GaryChike 5 месяцев назад
Slightly easier way to loop in reverse: `for x in range(10,1,-1):` = `for x in reversed(range1,11)):`
@adamartinmusic
@adamartinmusic 7 месяцев назад
thank you so much for helping. i understand you so well.
@PraviLukijanJC
@PraviLukijanJC 3 месяца назад
thanks for distracting me from ninjago overture theme that has been stuck in my head for hours. i am a c++ programmer but i want to learn python so i know complicated languages.
@naomiiki4569
@naomiiki4569 7 месяцев назад
Para mim, é o contrário, haha. Tenho pouca paciência ao aprender coisas e acabo interrompendo o curso frequentemente para me envolver em projetos.
@bahodirsiddiqov3071
@bahodirsiddiqov3071 Год назад
number 13 is an orphan😂😂😂😂
@Xkiller_48
@Xkiller_48 2 месяца назад
13 is Taylor Swift lucky number🤐
@FahimMalikOfficial
@FahimMalikOfficial 26 дней назад
have a sub bro, appreciate your free education and very easy to learn video!
@bigfly4167
@bigfly4167 5 месяцев назад
What extension pack are you using to get you VS code layout to look like that?
@imhere3445
@imhere3445 6 месяцев назад
Hey question. Im learning how to code with Crunchzilla and I’m trying to get the answer for a specific question which the internet doesn’t answer. In code monster that im using forloop is used too repeat code to make boxes c.fillRect. So they use this code:(i=0; i
@Animefan8050
@Animefan8050 5 месяцев назад
One of the best tutorials I've seen. I am learning Godot (whose programming language is extremely similar to Python) and this has cleared up a lot! Will subscribe for more. You explained in a way many dont. What's the function? How can you use the function? What's a practical example? You did all of that, nicely done.
@Vivek_xkt
@Vivek_xkt Год назад
Hey bro I have a doubt . It's from python Gui windows. You told us how to create a new window by clicking a button . My problem is when we created a new window, then How can I get the strings value from Entry boxes in the newly created window?!?! I am stuck in this problem from last 20hrs please help . I can use the get method for Entry boxes in 1st window but after creating 2nd window i am unable to use the get method on the entry boxes of window 2 :(
@Reymax164
@Reymax164 2 месяца назад
Coming from Java, Python is heck confusing for me. I understand other C based languages such as C# and C++ better 😅
@Reymax164
@Reymax164 2 месяца назад
Tbf, Java, C# and C++ are like the children of C so Python will feel alot different 🤔 Can't jump into OOP right away
@Tettzz
@Tettzz 3 месяца назад
Just started coding, see you in a few years!
@GVSdude20
@GVSdude20 4 месяца назад
bro you helped me with my coding project with this tutorial! Thankyou
@farhanbinsufian7233
@farhanbinsufian7233 8 месяцев назад
His videos forces me to think why people even buy paid course. It isn't even like he doesn't incorporate other misc. important stuff aswell. Keep going on Bro!
@rayforever
@rayforever Год назад
Proud to be 5th commenter
@gbzedaii3765
@gbzedaii3765 2 месяца назад
#while loops = Used to execute loops infinite amount of times. #for loops = used to execute loops a fixed number of times.
@hethere4345
@hethere4345 6 месяцев назад
Hmmmm we need matlab in my Engineering college.
@Jggapp016
@Jggapp016 Год назад
This episode is really interesting, keep it up!
@MassMen
@MassMen 4 месяца назад
Can you tell me how you have two screens
@JamalDid
@JamalDid 8 месяцев назад
Keep up the good work! You helped me out and now i understand more and better! Thank you
@niknam.344
@niknam.344 10 дней назад
Nice and useful, tnx❤
@javierchavarria1386
@javierchavarria1386 Год назад
what IDE are you using?
@BallzRolls
@BallzRolls Год назад
its pycharm
@karnikkumarsingh
@karnikkumarsingh 6 месяцев назад
I was first confused at coding but ur explanation is marvelous i like how you teach programming
@Ggxzstbccgbnjgcx
@Ggxzstbccgbnjgcx Месяц назад
1:47 thanks today is my birthday 🥳
@christinamammolito8887
@christinamammolito8887 2 месяца назад
Thank you, that was such a straight forward explanation.
@rayforever
@rayforever Год назад
MERN app development? I am having trouble with npm cuz they loads too much files Can you make course on how to set up mern app development
@AyanikaGhoshDastidar
@AyanikaGhoshDastidar Месяц назад
i might actually pass my practical tmrw tysm for this vid
@vividdaydream1516
@vividdaydream1516 6 месяцев назад
Okay, so a "for" loop is sort of a countdown or timer?
@SukreLopezBeats
@SukreLopezBeats 5 месяцев назад
High quality content. You win me as a subscriber.
@edwardh7985
@edwardh7985 3 месяца назад
great video
@DIYRobotGirl
@DIYRobotGirl 11 месяцев назад
But can we do that is a set of arrays with timer or wait time in millis and make the different arrays do different things from one another? 😮
@ShreyanshGupta13
@ShreyanshGupta13 26 дней назад
Bro your coding is so sexy
@AkshayKp-wz5dg
@AkshayKp-wz5dg 11 дней назад
Love from India ❤
@ZenZangetsu
@ZenZangetsu 6 месяцев назад
This stuff was confusing in my course and in my book. This really helped clear up some confusion. Thanks man!
@koja69
@koja69 3 месяца назад
Why in the world they decided to use "continue" instead of "skip". I hope skip does something that makes more sense, otherwise this is utterly meaningless.
@Reymax164
@Reymax164 2 месяца назад
I guess because in practical use or exception handling, you use it when you get an exception. After detecting the exception, the program handles it and *_continues_* without crashing. It's the same keyword in other languages.
@jorgegalvis554
@jorgegalvis554 20 дней назад
This way to explain it's really nice
@HsuMonMonThant
@HsuMonMonThant Год назад
Thank u so much bro Congratulation for 1M subscribers🥳
@kundankumar8467
@kundankumar8467 Год назад
Heyy , Can you upload Full stack MERN web development course ?? Please 🥺
@J0v0756
@J0v0756 3 часа назад
Ya think?!?
@anishpataskar1253
@anishpataskar1253 10 месяцев назад
duuuuudeee how do i run 2 lines of code in the same for loop lets say i wannna add a number to x 10 times and print it hapy 10 times in the same for loop
@Bissell22
@Bissell22 6 месяцев назад
It's the same way that he printed happy new year.
@pjm3005
@pjm3005 11 месяцев назад
i'm pretty sure the for loop executes faster than the while loop too.
@blucky983
@blucky983 Год назад
Thanks bro
@Dev_bhog
@Dev_bhog Год назад
thank you i had watched alot of videos and couldnt understand, yet i understand now good day.
@Cruzfire10
@Cruzfire10 Год назад
Thank you Benson Adventure Time!
@yunishmanandhar4817
@yunishmanandhar4817 Год назад
hey whats an itiration i need some simple definiton
@sunlightlord12
@sunlightlord12 19 дней назад
Thank You!
@rebeccabreez8928
@rebeccabreez8928 Год назад
i your videos just clear all my doughts . arigato gozaimasu !!
@DRACULACollection
@DRACULACollection 7 месяцев назад
love u bro u make me to understand ❤❤❤❤
@jenis-01
@jenis-01 Год назад
can you please make data structure algorithm course for C++? Please!!!!
@GTV_367
@GTV_367 Год назад
Good vids bro🤞🏽
@varshinisekhar4857
@varshinisekhar4857 Год назад
you are awesome 🤩
@joncaldwell4753
@joncaldwell4753 2 месяца назад
Good "for" you
@reincarnationofthelightking
@reincarnationofthelightking Месяц назад
thank you
@luisladino6162
@luisladino6162 4 месяца назад
Thanks bro
@schubidubi7048
@schubidubi7048 Месяц назад
thank you
@rekhasharma-gy9bc
@rekhasharma-gy9bc 7 месяцев назад
Thanks bro
@ghusandgamin
@ghusandgamin Год назад
That was helpful Thanks 🙏🙏
@abdulhannan-18
@abdulhannan-18 10 месяцев назад
break: breaks the loop at that iteration for x in range(1, 21): if x == 18: break print(x, end=' ') 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 for x in range(20): if x == 18: break print(x, end=' ') 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
@fastrobreetus
@fastrobreetus 3 месяца назад
You are an excellent instructor!
@isabellagenova3442
@isabellagenova3442 9 месяцев назад
hey
@Trivenikandru
@Trivenikandru 3 месяца назад
👏
@diegooo0725
@diegooo0725 Год назад
i didn´t understand this thank you
@ChewwyPew
@ChewwyPew 8 месяцев назад
So if we want to use for loop on a list, do we turn the list into strings with .str() after the list
@Lithium50
@Lithium50 8 месяцев назад
To turn a list into a string you use: newString = "".join(your_list)
@Ndujlz
@Ndujlz 8 месяцев назад
yes just go like this cars = ("Mercedes", "Audi", "BMW") for car in cars: print(car)
@tawilk
@tawilk Год назад
question: if I have a directory with a different number of items in each, how can I loop to access each item from 1st item to last/max item?
@Arsen_winning_way
@Arsen_winning_way Год назад
maybe you can use a [for item in 'name of the directory']
@tawilk
@tawilk Год назад
@@Arsen_winning_way I ended up using - len(file_paths) - to determine the number, then created a range with len being the max and looped it with a file position command.
@morpheus_circuit
@morpheus_circuit 9 месяцев назад
Once again great tutorial Bro Code
@IlIIllIlIlIIlIlIlIlIIl
@IlIIllIlIlIIlIlIlIlIIl 5 месяцев назад
your the best =))
@factlist07
@factlist07 Месяц назад
Really helpful!
@sameerjain9174
@sameerjain9174 Год назад
Bro you are the best guy for programming
@bruhhh.77
@bruhhh.77 Год назад
I fkin love you
@Bosy99616
@Bosy99616 8 месяцев назад
bro, you're my hero
@pedicle5509
@pedicle5509 11 месяцев назад
Thank you :)
@tara2337
@tara2337 7 месяцев назад
you rock Bro!
@mo-ab7315
@mo-ab7315 Год назад
tutorials are so goated
@ramial_rashid4440
@ramial_rashid4440 7 месяцев назад
thx
@mythicpulse-i9o
@mythicpulse-i9o Год назад
what a nice video
@abdulwahidhamidy6909
@abdulwahidhamidy6909 8 месяцев назад
Thanks
@Rawman_56
@Rawman_56 Год назад
You are awesome
@moniquebrasilbaptista1989
@moniquebrasilbaptista1989 Год назад
Thank you
@SavageScientist
@SavageScientist Год назад
great examples
@WINDOWSUSER-q4s
@WINDOWSUSER-q4s 10 месяцев назад
NICELY DONE...❤
@rajakm7544
@rajakm7544 Год назад
very useful
Далее
While loops in Python are easy ♾️
6:58
Просмотров 368 тыс.
Please Master These 10 Python Functions…
22:17
Просмотров 165 тыс.
Дикий Бармалей разозлил всех!
01:00
Python dictionaries are easy 📙
8:06
Просмотров 232 тыс.
Python lists, sets, and tuples explained 🍍
15:06
Просмотров 278 тыс.
How To Use List Comprehension In Python
6:41
Просмотров 8 тыс.
Nested loops in Python are easy ➿
5:35
Просмотров 304 тыс.
25 nooby Python habits you need to ditch
9:12
Просмотров 1,8 млн
Learn Python OOP in under 20 Minutes
18:32
Просмотров 39 тыс.
Let's code a beginner's Python BANK PROGRAM 💰
15:01
Просмотров 177 тыс.