Write a small program that accepts to represent the following pattern:
1
1 2
1 2 3
1 2 3 4
Here is a simple Python program that accepts and represents the given pattern:
```python
# Program to print the pattern
# Loop through 1 to 4 to control the rows
for i in range(1, 5):
# Loop to print numbers from 1 to i in each row
for j in range(1, i+1):
______ ________ __________ ___ _________ ___ ___ __________ __________.
_______ __________ ____ _____ ____ ___ __________ _______.
_________ ________ ______ _________ __________ __________ ________ _________ _________ __________ __________.
____ _______ __________ ______ ___ ______.
________ __________ _________ ___ ________ __________ _____ ____ _____.
________ _____ ____ _________ _______ ________ ________ ___.
___ ______ _______ ___ _________ __________ _______ ____ _________ ________ _____ ___.
_______ ____ ____ ________ _________ ________ ______ ___.
_______ __________ _____ __________ _____ _________ _______ ___ __________ ________ ______ _______.
__________ _______ ___ _____ _________ ___ ________ ______.
______ ___ _______ ______ _____ _____ _______ ___ _______ ___ ____ _____.
_________ ________ _______ __________ ___ ________ _______ __________ ________ ___ ____ ____.
___ _______ ______ _________ _____ _____ ________ _____ _____ ______ ________.
______ ____ ___ __________ ________ _____ _________ _____ _____ ________ _________.
___ _________ ____ ____ ___ ________ __________ ________ ___ ________.
______ _________ ________ ______ __________ __________ ___ ________ _______.
______ _________ ______ ________ ___ ________ _____ _____ ________ ____ ______.
_____ _______ ________ ________ ___ ____.
__________ __________ _______ ___ _________ _____ __________ _____ ____ ___ ___.
____ _________ ______.
Get Full Answer on WhatsApp