A teacher asked Ramesh to draw a Quadrilateral of a specific pattern with only symbol. The length and height should be L. Here L is the number of characters in every line.The height of the * quadrilateral is the number of lines it contains.
The slope of the quadrilateral taken as S represents the the number of extra space characters in a line when compared to its next line.
The last line will not have any space characters before the character.
Sample Input
6
9
Sample Output1
******
******
******
******
******
******
n = int(input())
m = int(input())
s = '*'*n
dx = m / (n-1)
for i in range(n):
ns = int(round(m - dx*i))
print(' '*ns, s, sep='')
Comments
Leave a comment