Pattern #2 on Python
Pattern #2 (Like Right angle Triangle)
Hi Friends
Welcome Yesterday we seen how to make left angle triangle pattern with star and given string.
Here similarly we code for right angle triangle pattern
Here similarly we code for right angle triangle pattern
Output: (Input is 3 rows)
*
**
***
----
CODE:
a = int(input('Enter number of rows: '))
for i in range(a):
n = a - i - 1
for j in range(a):
if n > j:
print(' ',end='')
else:
print('*',end='')
print()
------
By
PyKAR
Comments
Post a Comment