Write a Python program to print left arrow numbers pattern using for loop.
rows = int(input("Enter Left Arrow of Numbers Pattern Rows = ")) print("====The Left Arrow Numbers Pattern====") for i in range(rows, 0, -1): for j in range(i, 0, -1): print(j, end = ' ') print() for i in range(2, rows + 1): for j in range(i, 0, -1): print(j, end = ' ') print()
This Python example prints the left arrow of the pattern of the numbers using a while loop.
rows = int(input("Enter Left Arrow of Numbers Pattern Rows = ")) print("====The Left Arrow Numbers Pattern====") i = rows while(i >= 1): j = i while(j >= 1): print(j, end = ' ') j = j - 1 print() i = i - 1 i = 2 while(i <= rows): j = i while(j >= 1): print(j, end = ' ') j = j - 1 print() i = i + 1
Enter Left Arrow of Numbers Pattern Rows = 12
====The Left Arrow Numbers Pattern====
12 11 10 9 8 7 6 5 4 3 2 1
11 10 9 8 7 6 5 4 3 2 1
10 9 8 7 6 5 4 3 2 1
9 8 7 6 5 4 3 2 1
8 7 6 5 4 3 2 1
7 6 5 4 3 2 1
6 5 4 3 2 1
5 4 3 2 1
4 3 2 1
3 2 1
2 1
1
2 1
3 2 1
4 3 2 1
5 4 3 2 1
6 5 4 3 2 1
7 6 5 4 3 2 1
8 7 6 5 4 3 2 1
9 8 7 6 5 4 3 2 1
10 9 8 7 6 5 4 3 2 1
11 10 9 8 7 6 5 4 3 2 1
12 11 10 9 8 7 6 5 4 3 2 1