Python Pattern Programs - Printing Stars in Hollow Equilateral Triangle Shape | Pyramid Pattern
Автор: Amulya's Academy
Загружено: 2017-12-17
Просмотров: 97696
Описание:
In this Python Pattern Printing programs video tutorial you will learn to print stars in hollow right angle triangle shape in detail.
To print stars in hollow equilateral triangle shape in python you have to use two for loops. the first loop is responsible for rows and the second for loop is responsible for column.next we need to use if else conditional statements. To write the conditions we used logical or operator.
If you are using python 2 then in the above program you have to use print as statement and you cant use end in python 2, so
print("*",end="")
instead of this you have to use
print "*",
Thanks to Winter Arctic who gave the idea of using sum of row and column value.
For more free tutorials on computer programming
/ amulsacademy
/ amulsacademy
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: