Nested Loops and Patterns in Python

preview_player
Показать описание
In this video we are taking a look at Nested Loops and creating Patterns as a triangle or pyramid in python.
Let me know: Could you solve the integer Date task? (see below for timestamp) Drop me a comment with your alternative approach :-)

0:00 Introductory Example and functionality of Nested loops
02:10 Second Example: Creating Integer Dates
05:34 Creating patterns - basic understanding
07:00 Pattern - Triangle
08:45 Pattern - Pyramid
12:25 Pyramid with flexible rows
13:15 Nested list comprehension
Рекомендации по теме
Комментарии
Автор

Amazing stuff, clear and concise. Spent hours to understand how this nested for loops. You did it brilliant! Thanks so much

mrboyban
Автор

Finally I can understand how that works. I love how you explain step by step the exercise. Thank you!

jesusfajardo
Автор

Hey, Man watched more than half of your python tutorial and some Algo projects of you it is very easy to follow along than many other videos that I watched! Great Explanation kudos to you! you deserve more subscribers! keep going on Love from INDIA!

raghulsivaraj
Автор

Dude, you're amazing keep this amazing work, especially you are better than a teacher when it comes to explaining, awesome man

rashenkoshi
Автор

very helpful and well summarised, clearly explained everything and made it easy to follow along, thank you :)

chad
Автор

Thanks for the video! This is a great explanation!!!

shahin
Автор

Hey! Hope you are doing great. How can I practice nested loops in Jupiter?

axelmori
Автор

Your sounds like from the movie "The Dictator" lol . Thanks for video

MertcanGuldu
Автор

Hi i know you can also do a pyramid this way
for i in range(1, 6):
for j in range(i):
print(‘*’, end=‘ ‘)
print(‘ ‘)

But I don’t understand why you need to print(‘ ‘) at the end. I’d appreciate it if you could help thanks a lot

girlinthemorgue
Автор

Awesome! Just what I was looking for! No pun

desCD
Автор

I finally get it THAAAANK SOOOO MUCCCCH

lzaruis
Автор

This also works but here is not the last for loop
for i in range(4):
for j in range(4-i):
print(" ", end="")
for j in range(i+i):
print("*", end="")
print("*")

Jonnny
Автор

I think there are too many for loops for building the pyramid. the following codes do the same:
n = int(input("Enter the row number: "))
for i in range(n):
for j in range(n - i):
print (" ", end ="")
for k in range(2*i + 1):
print("0", end="")
print("")

nilsaha
welcome to shbcf.ru