# 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()
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
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!
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
@@NorfaizahMatLui 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
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!
i dont know english very well in comparison with hindi but your way of explain such a nice and very simple to understand that i understood it better than in hindi
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.
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
Man I could barely understand a word my programmer teacher said during the entire semester. He had this really thick south-asian accent. Took me several lessons to understand that he was saying "unicode" and not "unicorn", let alone understanding what unicode is. The language was Java which is a bit unintuitive compared to Python and the course book was this 600 pages, dull, black and white textbook that I couldn't muster any motivation to read multiple pages out of. Somehow I managed to get the highest grade in Programming 101 and the second highest in Programming 102 (I think the teacher was overly nice and just gave out good grades). The end result was that I didn't feel like I understood anything about programming whatsoever despite what my grade sheet said. For some reason I've had a really negative or hopeless attitude towards programming ever since. What I'm trying to say is: these videos are great.
Yes this is easy but there are programs that go like the output should be like the following * * * * * * * * * * * * * or like * * * * * * * * can you make a video on how to do them please
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))
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.
#shapemakerproject ➿ rows = int(input("Enter the number of rows :")) columns = int(input("Enter the number of columns :")) symbol = input("Enter a symbol to use :") for x in range(rows) : for y in range (columns): print(symbol, end="") print()
Here is the code. Replace the placeholders with your file name and path import os def delete_test_file(file_path): try: if os.path.exists(file_path): os.remove(file_path) print(f"File {file_path} deleted.") else: print(f"File {file_path} does not exist.") except Exception as e: print(f"Error: {e}") # Test path to a non-essential file delete_test_file("C:/path/to/non/critical/test/file.txt")
I love you dawg not in a gay way but this vid saved my ass I was having trouble with for loops cause it was a bit confusing to me, then I saw this vid and I understand now. Thanks you got a new subscriber
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?
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.
# 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()
You're my hero... Love from South Africa :)
There’s a little typo in the code, columns go horizontal so the outer loop in this case represents the columns and inner loop is the rows
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
Same happens to me
Its a completely opposite for me tho i need more in depth explanation
I thought I was the only one
Yeah me too😢
Same condition for everyone else. No one just realises it
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!
U are the best🥲, u are supposed to be a lecture😏
Bro, you saved me ass, I was gonna fail for sure but you absolute ultimate gigachad saved my. Thank you King. You dropped this 👑
Chaa
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
This is very clever and give me a better understanding in nested loop
This guy is one of my favorite people on Earth. I don't even know who you are but you are 100% a king
Aaah!!! It's all clicked in my head now. Thanks man!
clear explanation, helped and saved my brain from overthinking
took me about an hour but finally I understand nested loops, thank you Bro Code
3 days now, still dont fully understand it
@@NorfaizahMatLui 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
@@krosarian that´s actually a pretty good. thx man
@@krosarian Buddy to print what you wrote:
for i in range(3):
for k in range(5):
print("hello", end="")
print()
Hope yer fine.
you are a blessing to me dude !
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!
Also a first semester CS student, was totally lost. Hoping this video helps. Will watch when I get home from my lecture.
I have my a levels computer science exam tomorrow and you just saved my life
Thanks bro, you explain them really well
Perfectly explained, thank you!
Bro, may I say you have such a soothing and beautiful voice? 🤗
Now I understand nexted loop better👏✔️
Dude i fking love u, ur content is outstanding
i dont know english very well in comparison with hindi but your way of explain such a nice and very simple to understand that i understood it better than in hindi
best explanation of nested loops out there
Thanks for the explanation really needed it I was literally going mad trying to understand it on my own not know that it is not that deep
amazing videos, really helpful for GCSE computer science
You entirely clear my concept ... thanks alot bro 😭😭🤌
You’re awesome man! Thanks
Thank you bro for all your videos. I Iearnt java and javascript extensively through your videos.
great video I learnt something
Bro saved me from failing in my class 11th practical exams 🙏🏽🙏🏽🙃
best lesson ever!
great video bro .love from INDIA🧡🤍💚
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.
excellent vid. really well explained. thanks
This is a life saver video I have my exam tomorrow so thank u so much
You are the best!!!!!
Bro youre amazing thank you
Super content and editing
Thank you sir for your help..
awesome content as always, thanks Bro!👌
Thank you so much sir
Thank so very much for your help on leaning Python .. Great, to the point Teacher.
Thx 4 vid bro !
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
thanks for your explanation it's really helpful ☺
Thanks for the wonderful video...
Thank you so much for this
Wow !! super expalination !@
Brilliant. Thank you.
bro you are my G
you're awesome
man i love you thx
Man I could barely understand a word my programmer teacher said during the entire semester. He had this really thick south-asian accent. Took me several lessons to understand that he was saying "unicode" and not "unicorn", let alone understanding what unicode is. The language was Java which is a bit unintuitive compared to Python and the course book was this 600 pages, dull, black and white textbook that I couldn't muster any motivation to read multiple pages out of.
Somehow I managed to get the highest grade in Programming 101 and the second highest in Programming 102 (I think the teacher was overly nice and just gave out good grades). The end result was that I didn't feel like I understood anything about programming whatsoever despite what my grade sheet said. For some reason I've had a really negative or hopeless attitude towards programming ever since. What I'm trying to say is: these videos are great.
very helpful thanks
you are awesome
Very nice
ahhh this is soo baffling, my brain cannot comprehend this idea
I finally see the light!😀
Yes this is easy but there are programs that go like the output should be like the following
*
* * *
* * * * *
* * *
*
or like
*
* *
* *
* *
*
can you make a video on how to do them please
you are the best
do you have a matrix done ? That would be great !
Good job 👍
I clearly understand now but I tried it several times, it gives me syntax error I do not know what is wrong
THANK YOU SO MUCH
idk why i was so confused on nested loops to start out with now
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..
It’s never too late
Did you got it bro?
"SAVED, I'M SAVED"
this guy tptally sounds like ryan george from pitch meeting , also thanks for your video made a complex topic so simple
v v good. ty ❤
respect Teacher.
@Bro Code
❤ Thank You Very Much ❤
Really loved the explanations, thanks! One question, how would the code look like if I wanted to make a triangle tho?
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))
Thank you❤
Can u make it in one line please?
Thank you
Hey Bro code, do you have an example of a text based game in python??
Thankyou❤
So I'm doing exactly this but for some reason it's shorting me a symbol at the end.
Bro pls tell which site u use
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.
#shapemakerproject ➿
rows = int(input("Enter the number of rows :"))
columns = int(input("Enter the number of columns :"))
symbol = input("Enter a symbol to use :")
for x in range(rows) :
for y in range (columns):
print(symbol, end="")
print()
Very well explained, thank you!
damn ur awesome
Tq so much
Can you make a tutorial how to delete system32 with python ?
no lol
@@BroCodez Ok =l
Here is the code. Replace the placeholders with your file name and path import os
def delete_test_file(file_path):
try:
if os.path.exists(file_path):
os.remove(file_path)
print(f"File {file_path} deleted.")
else:
print(f"File {file_path} does not exist.")
except Exception as e:
print(f"Error: {e}")
# Test path to a non-essential file
delete_test_file("C:/path/to/non/critical/test/file.txt")
@@ElwinJoby Hey thank you !🥰🥰
@@ElwinJoby What have you done
I love you dawg not in a gay way but this vid saved my ass I was having trouble with for loops cause it was a bit confusing to me, then I saw this vid and I understand now. Thanks you got a new subscriber
thnx , with anki flashcards would be cool to memorize
Such a beautiful explanation Sir. Thanks a lot for sharing making it easy to understand for beginners.
after first loop can we write print(symbol * columns ) and finish the code ?
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?
Which app do u use to program?
PyCharm
Wher full rust tutorial
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.
❤❤😊😊
X is a counter. What is a counter?
Watch the video on for loops
can someone tell me how to get this type of window in python with the program result at the bottom
i think you mistaken row for column and column for row
end="/t"
Will make your result like a table
I think you mean \t
a loop inside of an another loop outer loop inner loop
Bro can you make a Kotlin tutorial?
I crash course your Java andddddd employers seeks Kotlin....
bro which idle do u use
Pycharm
Chad 🗿 explanation