Print the pattern using for loop using python || part 1 || cbse||MCA||BCA|| python in Hindi
Hello dear Students, today we cover topic how to print pattern
this is first part of this series....
We need to use two for loops to print patterns, i.e. nested loops.
There is a typical structure to print any pattern, i.e. the number of rows and columns in the pattern. Outer loop tells us the number of rows used and the inner loop tells us the column used to print pattern.
Accept the number of rows from a user using input() function or decide the size of a pattern.
Iterate the number of rows using outer for loop and range() function
Next, the inner loop or nested for loop to handle the number of columns. Inner loop iteration depends on the values of the outer loop.
Print start, number, asterisk, Pyramid, and diamond pattern using the print() function.
Add a new line after each row, i.e. after each iteration of outer for loop so you can display pattern appropriately.
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
rows = 6
for num in range(rows):
for i in range(num):
print(num, end=" ") # print number
print(" ")
Learn Python for Beginners in hindi
https://youtu.be/vsxFigs2Hac
Learn Mathematics for class X in hindi
https://youtu.be/Ssxc5_-BkXQ
If you found this video valuable, give it a like.
If you know someone who needs to see it, share it.
Leave a comment below with your thoughts.
Add it to a playlist if you want to watch it later.
Thanks :)
DISCLAIMER: The information contained on this YouTube Channel and the resources available for download/viewing through this YouTube Channel are for educational and informational purposes only.
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Print the pattern using for loop using python || part 1 || cbse||MCA||BCA|| python in Hindi», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.