In this Python Pattern Printing Programs video tutorial you will learn to print star '*' in right angle triangle shape.
To print star pyramid patterns in python you have to use two for loops. This program contains two for loops: the first loop is responsible for rows and the second for loop is responsible for columns.
For python 2:
import operator
n = input("enter the number of rows:")
for i in range(n):
count=0
for j in range(n-i-1):
print " ",
for j in range(i+1):
print "*",
if operator.lt(count,i): #or write the condition as in above program
print "A",
count=count+1
print
lt(a, b) is equivalent to a less than b condition.
For more free tutorials on computer programming
http://www.facebook.com/AmulsAcademy
twitter.com/AmulsAcademy