I have already drawn a right-side-up right triangle already that looks like this:
*
* *
* * *
* * * *
* * * * *
with code:
row = 1
while row <= size:
col = 1
while col <= row:
print chr,
col = col + 1
print ''
row = row + 1
print ''
But I need to draw a triangle that looks like this:
* * * * *
* * * *
* * *
* *
*
and I am not entirely sure how to go about it. I know it requires at least 2 nested loops utilizing printing spaces as well as the character. It is required that only while loops are used.
I would appreciate it if someone could shed light on how to write this for me.