Nested loops in Python are easy ➿

  Рет қаралды 253,968

Bro Code

Bro Code

Жыл бұрын

#Python #course #tutorial
nested loop = A loop within another loop (outer, inner)
outer loop:
inner loop:
rows = int(input("Enter the # of rows: "))
columns = int(input("Enter the # of columns: "))
symbol = input("Enter a symbol to use: ")
for x in range(rows):
for y in range(columns):
print(symbol, end="")
print()

Пікірлер: 130
@BroCodez
@BroCodez Жыл бұрын
# nested loop = A loop within another loop (outer, inner) # outer loop: # inner loop: rows = int(input("Enter the # of rows: ")) columns = int(input("Enter the # of columns: ")) symbol = input("Enter a symbol to use: ") for x in range(rows): for y in range(columns): print(symbol, end="") print()
@mondlistyleman9389
@mondlistyleman9389 Жыл бұрын
You're my hero... Love from South Africa :)
@Lex_Marion
@Lex_Marion Жыл бұрын
I don't know why but my brain really, REALLY wants to overthink both for loops and nested loops. They're really simple concepts but something always gets wonky in the monkey wires. This was a great video, really needed something to explain it in the most babymode 5 year old way, thank you
@gerardogodinez6919
@gerardogodinez6919 Жыл бұрын
Same happens to me
@sakshampokhrel42
@sakshampokhrel42 10 ай бұрын
Its a completely opposite for me tho i need more in depth explanation
@mello4392
@mello4392 8 ай бұрын
I thought I was the only one
@IMDash_freak002
@IMDash_freak002 8 ай бұрын
Yeah me too😢
@Frail-pg8xt
@Frail-pg8xt 8 ай бұрын
Same condition for everyone else. No one just realises it
@cdkw8254
@cdkw8254 10 ай бұрын
Bro, you saved me ass, I was gonna fail for sure but you absolute ultimate gigachad saved my. Thank you King. You dropped this 👑
@harleenkaur2096
@harleenkaur2096 Жыл бұрын
Thank you much This is the first time I have understood nested loops, pattern after watching so many videos God bless Please keep making more videos on programming
@jaspersumugat6951
@jaspersumugat6951 Жыл бұрын
This is very clever and give me a better understanding in nested loop
@francisjacquart9618
@francisjacquart9618 8 ай бұрын
THAT IS SO WELL THOUGHT OUT! BRILLIANT! AND I AM STARTING TO UNDERTAND HOW PROGRAMMERS THINK AND DEVELOP THEIR PROGRAMS! THANK YOU SO MUCH FOR ALL YOUR TUTORIALS!
@mask09499
@mask09499 5 ай бұрын
U are the best🥲, u are supposed to be a lecture😏
@yonisapir6270
@yonisapir6270 Жыл бұрын
Perfectly explained, thank you!
@jeiddoromal4804
@jeiddoromal4804 5 күн бұрын
clear explanation, helped and saved my brain from overthinking
@admo001
@admo001 10 ай бұрын
Thanks bro, you explain them really well
@markrose805
@markrose805 6 ай бұрын
You’re awesome man! Thanks
@HassanRaza-pe5rh
@HassanRaza-pe5rh Жыл бұрын
Very clearly explained bro! Thanks!
@babludas007
@babludas007 7 ай бұрын
You entirely clear my concept ... thanks alot bro 😭😭🤌
@RameshKumar-ng3nf
@RameshKumar-ng3nf 3 ай бұрын
Such a beautiful explanation Sir. Thanks a lot for sharing making it easy to understand for beginners.
@Compuscience-Python-Prog-Exps
@Compuscience-Python-Prog-Exps Жыл бұрын
Thank so very much for your help on leaning Python .. Great, to the point Teacher.
@ch_dave19
@ch_dave19 Жыл бұрын
Thank you bro for all your videos. I Iearnt java and javascript extensively through your videos.
@cartoon_station123
@cartoon_station123 Жыл бұрын
Thank you sir for your help..
@thedeparted_one
@thedeparted_one Жыл бұрын
Bro, may I say you have such a soothing and beautiful voice? 🤗
@calculuslifer4024
@calculuslifer4024 Жыл бұрын
Now I understand nexted loop better👏✔️
@Louviewtube
@Louviewtube 6 ай бұрын
Brilliant. Thank you.
@jasonhammerle3582
@jasonhammerle3582 11 ай бұрын
awesome content as always, thanks Bro!👌
@ugonkem9878
@ugonkem9878 Жыл бұрын
Thank you so much for this
@MrSimonmartinlee
@MrSimonmartinlee 3 ай бұрын
excellent vid. really well explained. thanks
@bodyart1460
@bodyart1460 Жыл бұрын
very helpful thanks
@adivhahoratshimolo2671
@adivhahoratshimolo2671 2 ай бұрын
You are the best!!!!!
@anandh7094
@anandh7094 5 ай бұрын
thanks for your explanation it's really helpful ☺
@KvintKek
@KvintKek 11 ай бұрын
Wow !! super expalination !@
@user-ky9cq3th8e
@user-ky9cq3th8e 6 ай бұрын
Thank you so much sir
@muhammadabdullahwaseem3040
@muhammadabdullahwaseem3040 Жыл бұрын
I have my a levels computer science exam tomorrow and you just saved my life
@artemblinkov2241
@artemblinkov2241 5 ай бұрын
Really loved the explanations, thanks! One question, how would the code look like if I wanted to make a triangle tho?
@raxivy7878
@raxivy7878 8 ай бұрын
THANK YOU SO MUCH
@omaralbrkaui2013
@omaralbrkaui2013 9 ай бұрын
man i love you thx
@bekturasanbekov1979
@bekturasanbekov1979 11 ай бұрын
Thx 4 vid bro !
@godxdestructionyt6173
@godxdestructionyt6173 3 ай бұрын
Thanks 😊
@KeremLBJ
@KeremLBJ 7 ай бұрын
I didn't like the appearance of having a period after the last number in the iteration, so I wanted to change how it looks. But I also wanted to avoid hard-coding it to be the exact number '9'. Here is the solution I came up with, using the str.join() method: for x in range(3): sequence = range(1, 10) last_number = list(sequence)[-1] numbers = [str(y) if y != last_number else str(y) for y in sequence] print(".".join(numbers))
@A1NTT
@A1NTT 5 ай бұрын
I have watched multiple videos, trying to understand nested loops and this video finally made sense to me! Thanks for breaking this down in such an easy way.
@Dunith_Munasinghe
@Dunith_Munasinghe Жыл бұрын
Thank you❤
@umaydilarakuscu642
@umaydilarakuscu642 Жыл бұрын
you're awesome
@Mario-if5tl
@Mario-if5tl 9 ай бұрын
Good job 👍
@ethana1
@ethana1 Ай бұрын
v v good. ty ❤
@bobaayla
@bobaayla 6 ай бұрын
This is a life saver video I have my exam tomorrow so thank u so much
@klliope
@klliope 8 ай бұрын
took me about an hour but finally I understand nested loops, thank you Bro Code
@user-th2js2nv3f
@user-th2js2nv3f 7 ай бұрын
3 days now, still dont fully understand it
@klliope
@klliope 7 ай бұрын
@@user-th2js2nv3f take your time, what worked for me was writing it on a whiteboard, and trying to explain it with my own words, if you think about it it's like multiplication: For n in range(3) For z in range(5) Print("hello") The first for loop will tell you how many times the next loop will be done, in this case 3, and then the second loop, will print 5 "hello": Hello hello hello hello hello Hello hello hello hello hello Hello hello hello hello hello You printed 5 hello's, 3 times
@banane442
@banane442 4 ай бұрын
@@klliope that´s actually a pretty good. thx man
@SnPnibba
@SnPnibba 2 ай бұрын
@@klliope Buddy to print what you wrote: for i in range(3): for k in range(5): print("hello", end="") print() Hope yer fine.
@ExcelTutorials1
@ExcelTutorials1 Жыл бұрын
Very well explained, thank you!
@chalanagimhana8275
@chalanagimhana8275 4 ай бұрын
you are the best
@Raja-tt4ll
@Raja-tt4ll 3 ай бұрын
Very nice
@kqwl
@kqwl 10 ай бұрын
Thank you
@MESHALGAMEZ
@MESHALGAMEZ 3 ай бұрын
Thx bro for the good explanation I have an exam tomorrow and I didn’t understand nested loops bcz the explanation in the digital book that the school gave me was CONFUSING AND COMPLICATED
@gamisr2848
@gamisr2848 3 ай бұрын
First semester CS student. Nested loops confused the hell out of me in class last week. This video helped clear some of the confusion. Much appreciated!
@quonkylops
@quonkylops 3 ай бұрын
Also a first semester CS student, was totally lost. Hoping this video helps. Will watch when I get home from my lecture.
@mavatrollinggarage4431
@mavatrollinggarage4431 Жыл бұрын
Tq so much
@johnbainbridge1931
@johnbainbridge1931 11 ай бұрын
I finally see the light!😀
@nfsheat1456
@nfsheat1456 2 ай бұрын
damn ur awesome
@xudayfitechoffiaicl5125
@xudayfitechoffiaicl5125 Жыл бұрын
respect Teacher. @Bro Code
@MrDarkplace22
@MrDarkplace22 Күн бұрын
this guy tptally sounds like ryan george from pitch meeting , also thanks for your video made a complex topic so simple
@fabianodeoliveira7
@fabianodeoliveira7 10 ай бұрын
haha, valeu amigo. Estou fazendo um curso qui no Brasil usam essa refêrencia para ensinar for in range. Vou ver mais aulas, não compreendo inglês, mas entendo o código.
@robertfaney4148
@robertfaney4148 2 ай бұрын
do you have a matrix done ? That would be great !
@MrP-jg3cc
@MrP-jg3cc 11 ай бұрын
Hey bro I'm new to python, I just want to kick start my career I'm 23 now, is it ok to learn python from basics., Bcz I feel aged for programming..
@hanshalili174
@hanshalili174 29 күн бұрын
It’s never too late
@manuelsantosjr9822
@manuelsantosjr9822 8 ай бұрын
Hey Bro code, do you have an example of a text based game in python??
@pubudinijayawardana3801
@pubudinijayawardana3801 5 күн бұрын
sir how can I use this expression in python for nested loops? val= int(input()) inputs are 2 and 5. and output should be * mark as rectangle shape. Please explain. Thank you.
@ramazanyetismis192
@ramazanyetismis192 6 ай бұрын
after first loop can we write print(symbol * columns ) and finish the code ?
@moralfuxery
@moralfuxery 5 ай бұрын
My thing and im in my 3rd werk for python is when I'm reading or watching this material i understand it, but i have an issue seeifn where you use it. Maybe this comes along once you understand all the fundamentals concretely bc i sure as hell don't yet. But this leads to massive overthinking on my part. Like, i have a simple site written in simple html/css. I have made a database in docker with MSSQL, and i want to make a python application to get the data from the DB and display it on the webpage. In very generic terms this is the "stack" im looking for no?
@sumfatt640
@sumfatt640 7 ай бұрын
thnx , with anki flashcards would be cool to memorize
@billythenarwhal1579
@billythenarwhal1579 3 ай бұрын
So I'm doing exactly this but for some reason it's shorting me a symbol at the end.
@jinkazama3647
@jinkazama3647 Жыл бұрын
Can u make it in one line please?
@dipikapandya4622
@dipikapandya4622 3 ай бұрын
Bro saved me from failing in my class 11th practical exams 🙏🏽🙏🏽🙃
@karnikabaroniya
@karnikabaroniya 5 ай бұрын
can someone tell me how to get this type of window in python with the program result at the bottom
@senpaigt911
@senpaigt911 Жыл бұрын
Can you make a tutorial how to delete system32 with python ?
@BroCodez
@BroCodez Жыл бұрын
no lol
@senpaigt911
@senpaigt911 Жыл бұрын
@@BroCodez Ok =l
@_GRBL
@_GRBL Жыл бұрын
Wher full rust tutorial
@salmankamboh90
@salmankamboh90 4 ай бұрын
Thank You make it simple bro codez
@Muhammad-ul8on
@Muhammad-ul8on Жыл бұрын
Chad 🗿 explanation
@jiobrando
@jiobrando Жыл бұрын
Bro can you make a Kotlin tutorial? I crash course your Java andddddd employers seeks Kotlin....
@manisarijal2146
@manisarijal2146 8 ай бұрын
❤❤😊😊
@ElyamineFahardine-bi8md
@ElyamineFahardine-bi8md 5 ай бұрын
Which app do u use to program?
@AyuPlus
@AyuPlus 2 ай бұрын
PyCharm
@JoaoPedro-vf1ke
@JoaoPedro-vf1ke Жыл бұрын
hello bro, hope you're doing well
@user-dj7ic1xs2p
@user-dj7ic1xs2p 10 ай бұрын
a loop inside of an another loop outer loop inner loop
@AK-Star007
@AK-Star007 Жыл бұрын
end="/t" Will make your result like a table
@cdkw8254
@cdkw8254 10 ай бұрын
I think you mean \t
@bunnygirl8482
@bunnygirl8482 Жыл бұрын
Arigatō aniki!
@mathocity8337
@mathocity8337 11 ай бұрын
Make sense
@korypuller6830
@korypuller6830 Ай бұрын
@alexyakoveno4682
@alexyakoveno4682 Жыл бұрын
@saiguyplays4952
@saiguyplays4952 7 ай бұрын
bro which idle do u use
@AyuPlus
@AyuPlus 2 ай бұрын
Pycharm
@AF_Gulfstream
@AF_Gulfstream 7 ай бұрын
Loop de loop
@padmajapotlapally5771
@padmajapotlapally5771 Жыл бұрын
tini paduko
@sakshamkhetarpal6839
@sakshamkhetarpal6839 Жыл бұрын
can you please explain this question Ask the users favorite color and if it is a rainbow color print the color two times and if the color is not a rainbow color print all the even numbers before the birthdate of the user
@tauhidalam-8143
@tauhidalam-8143 8 ай бұрын
what does the 'end' command do?
@fuzzylogics139
@fuzzylogics139 7 ай бұрын
Your comment is a month old but if you have not yet figured it out (or if someone else is reading your comment and wondering the same thing: it tells the program to print all the numbers on the same line: 1234567 1234567 1234567 Otherwise it would put each number on a new line 1 2 3 4 5 6 7 1 2 3 4 5 6 7 1 2 3 4 5 6 7 And if you would put a space between the parentheses it will put a space between the numbers: 1 2 3 4 5 6 7 You can just experiment with what happens when you do not put the ,end=" " there then you will see
@tauhidalam-8143
@tauhidalam-8143 7 ай бұрын
@@fuzzylogics139 Thank you bro before that i had a vague idea what it did now its clear
@fuzzylogics139
@fuzzylogics139 7 ай бұрын
Great! :) @@tauhidalam-8143
@boglin
@boglin 3 ай бұрын
this just doesnt click with me at all, this is the hardest concept so far. im hitting a wall and its only week 3. fml
@solRandom
@solRandom 2 ай бұрын
The outside loop indicates how many times we do the inside loop.
@Derp-Dylan12
@Derp-Dylan12 Ай бұрын
Same I understand it on paper but once I try to do anything I get confused
@smedge4048
@smedge4048 4 ай бұрын
X is a counter. What is a counter?
@AyuPlus
@AyuPlus 2 ай бұрын
Watch the video on for loops
@merwanmohammed8332
@merwanmohammed8332 7 ай бұрын
i think you mistaken row for column and column for row
@vottak304
@vottak304 Жыл бұрын
a = int(input("Enter the # of rows: ")) b = int(input("Enter the # of columns: ")) symbol = input("Enter a symbol to use: ") for i in range(a): print(symbol*b, end=" ")
@coddingbhaj7695
@coddingbhaj7695 5 ай бұрын
its feels like i a
@lookingforahookup
@lookingforahookup 8 ай бұрын
4:54 That’s not a rectangle
@ronaldosiuu2886
@ronaldosiuu2886 11 ай бұрын
dont get it
@cdkw8254
@cdkw8254 10 ай бұрын
Comment
@cdkw8254
@cdkw8254 10 ай бұрын
Inside a comment
@cdkw8254
@cdkw8254 10 ай бұрын
Nested comment
@YashTiwari-13
@YashTiwari-13 8 ай бұрын
bro
@piotrkopcewicz5227
@piotrkopcewicz5227 Жыл бұрын
comment
@piotrkopcewicz5227
@piotrkopcewicz5227 Жыл бұрын
in the comment
@tongtong1506
@tongtong1506 Жыл бұрын
@@piotrkopcewicz5227 nested comment
@yohane1161
@yohane1161 8 ай бұрын
easy? i got 10/20 tho
Python lists, sets, and tuples explained 🍍
15:06
Bro Code
Рет қаралды 222 М.
Countdown timer program in Python ⌛
5:56
Bro Code
Рет қаралды 117 М.
Pray For Palestine 😢🇵🇸|
00:23
Ak Ultra
Рет қаралды 26 МЛН
Joven bailarín noquea a ladrón de un golpe #nmas #shorts
00:17
ХОТЯ БЫ КИНОДА 2 - официальный фильм
1:35:34
ХОТЯ БЫ В КИНО
Рет қаралды 2,3 МЛН
СҰЛТАН СҮЛЕЙМАНДАР | bayGUYS
24:46
bayGUYS
Рет қаралды 720 М.
While loops in Python are easy ♾️
6:58
Bro Code
Рет қаралды 302 М.
1 YEAR OF PYTHON CODING IN 1 MINUTE !!!!!
1:02
Pythonic
Рет қаралды 14 М.
Nested Loops in Java
10:09
Neso Academy
Рет қаралды 257 М.
For loops in Python are easy 🔁
5:06
Bro Code
Рет қаралды 235 М.
Solve any Star Pattern program in Python
18:44
Simply Coding
Рет қаралды 836 М.
Python 101: Learn the 5 Must-Know Concepts
20:00
Tech With Tim
Рет қаралды 1 МЛН
Functions in Python are easy 📞
10:38
Bro Code
Рет қаралды 377 М.
Python dictionaries are easy 📙
8:06
Bro Code
Рет қаралды 189 М.
Pray For Palestine 😢🇵🇸|
00:23
Ak Ultra
Рет қаралды 26 МЛН