Using the followings program, write a Python Program to Print 4 Triangle Number Patterns thoses mentioned bellow.
# This program displays a triangle pattern.
SIZE = 10
for r in range(1, SIZE):
for c in range(1, r + 1):
print('*', end='')
print()
Output: we need to modify the code to print same like these patterns:
====================
Pattern A:
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
1 2 3 4 5 6
1 2 3 4 5 6 7
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8 9
Pattern B:
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
6 6 6 6 6 6
7 7 7 7 7 7 7
8 8 8 8 8 8 8 8
9 9 9 9 9 9 9 9 9
Pattern C:
9 9 9 9 9 9 9 9 9
8 8 8 8 8 8 8 8
7 7 7 7 7 7 7
6 6 6 6 6 6
5 5 5 5 5
4 4 4 4
3 3 3
2 2
1
Pattern D:
Pattern A:
Pattern B:
Pattern C:
Pattern D:
need an explanation for this answer? contact us directly to get an explanation for this answer