# nested loops = The "inner loop" will finish all of it's iterations before # finishing one iteration of the "outer loop" rows = int(input("How many rows?: ")) columns = int(input("How many columns?: ")) symbol = input("Enter a symbol to use: ") for i in range(rows): for j in range(columns): print(symbol, end="") print()
This dude makes everything so easy to understand, keep up the great work
by far the most confusing one, might have to look up the docs on this ngl
I found this a bit tricky to understand but think Im now there. Ive added comments to try help other people, but I'm also willing to accept I might be wrong. # nested loop = is the general concept of having one loop inside another loop. # nested loop = the 'inner loop' will finish all of its iterations before finishing the iteration of the 'outer loop' # To best demonstrate this we will create a program to draw a rectangle made out of a symbol of our choice. # We need to set a width, height and the symbol of choice. rows = int(input("How many rows?: ")) columns = int(input("How many Columns: ")) symbol = input('What symbol would you like to use?: ') # Now it's time for the nested loop. We're going to create an outer for loop and an inner for loop. # The outer for loop will be in charge of the rows and the inner the columns. for i in range(rows): for j in range(columns): # This loop will be iterated first. print(symbol, end="") # This will print the symbol once every iteration. Will iterate 'columns' times. # After we use a print statement the console will start a new line. We don't want this when defining the columns so we add "end=". print() # This will print the symbol once every iteration. Will iterate 'rows' times. # We do want a new line when defining rows. So we add a print statement that is empty to initiate a new row per iteration.
Started programming for about 2 years ago and kind of lost the spark due to boring material. Decided to really do this now and must say that the content of your videos are easy to understand and inspiring!
keep it up bro
Your videos lectures are sincerely good and very easy to understand. You made me love learning Python! My two thumbs up for you Bro! Keep it up! Thank you very much!
Quick and straight to the point. Thanks!
Great easy to follow tutorials. ππ»ππ»ππ»
Niceπ
May, this channel live forever.
Finally! After practicing and Watching over and over.
2 lines code(god command lines) was amazing, it helped me a lot, tks Bro
Astonishing
This video helped me with homework on zybook. Thank you!!!!
for i in range(row): print(sym*col)
Well said
niceeeee
nice
@Raghav-lm10