Skip to content

Commit 90bf5f5

Browse files
authored
Merge pull request openAOD#913 from Mahak008/main
Create numericpattern182.py
2 parents 3e2a1ae + 01422d6 commit 90bf5f5

40 files changed

+902
-1
lines changed

Numeric Patterns/numericpattern148.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
height = int(input())
2+
3+
for i in range(1,height+1):
4+
5+
for j in range(1,i+1):
6+
print(i,end=" ")
7+
8+
for j in range(height-i,0,-1):
9+
print("*",end=" ")
10+
11+
print()
12+
13+
14+
# Sample Input :- 5
15+
# Output :-
16+
# 1 * * * *
17+
# 1 2 * * *
18+
# 1 2 3 * *
19+
# 1 2 3 4 *
20+
# 1 2 3 4 5

Numeric Patterns/numericpattern149.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
height = int(input())
2+
3+
for i in range(1,height+1):
4+
5+
for j in range(1,i+1):
6+
print(j,end=" ")
7+
8+
for j in range(height-i,0,-1):
9+
print("*",end=" ")
10+
11+
print()
12+
13+
# Sample Input :- 5
14+
# Output :-
15+
# 1 * * * *
16+
# 1 2 * * *
17+
# 1 2 3 * *
18+
# 1 2 3 4 *
19+
# 1 2 3 4 5

Numeric Patterns/numericpattern150.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
height = int(input())
2+
3+
for i in range(1,height+1):
4+
5+
for j in range(1,height-i+2):
6+
print(height-i+1,end=" ")
7+
8+
for j in range(1,i):
9+
print("*",end=" ")
10+
11+
print()
12+
13+
14+
# Sample Input :- 5
15+
# Output :-
16+
# 5 5 5 5 5
17+
# 4 4 4 4 *
18+
# 3 3 3 * *
19+
# 2 2 * * *
20+
# 1 * * * *

Numeric Patterns/numericpattern151.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
height = int(input())
2+
3+
for i in range(1,height+1):
4+
5+
for j in range(1,height-i+2):
6+
print(j,end=" ")
7+
8+
for j in range(1,i):
9+
print("*",end=" ")
10+
11+
print()
12+
13+
# Sample Input :- 5
14+
# Output :-
15+
# 1 2 3 4 5
16+
# 1 2 3 4 *
17+
# 1 2 3 * *
18+
# 1 2 * * *
19+
# 1 * * * *

Numeric Patterns/numericpattern152.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
height = int(input())
2+
3+
for i in range(1,height+1):
4+
5+
for j in range(1,height-i+1):
6+
print("*",end=" ")
7+
8+
for j in range(i,0,-1):
9+
print(i,end=" ")
10+
11+
print()
12+
13+
# Sample Input :- 5
14+
# Output :-
15+
# * * * * 1
16+
# * * * 2 2
17+
# * * 3 3 3
18+
# * 4 4 4 4
19+
# 5 5 5 5 5

Numeric Patterns/numericpattern153.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
height = int(input())
2+
3+
for i in range(1,height+1):
4+
5+
for j in range(1,height-i+1):
6+
print("*",end=" ")
7+
8+
for j in range(i,0,-1):
9+
print(j,end=" ")
10+
11+
print()
12+
13+
# Sample Input :- 5
14+
# Output :-
15+
# * * * * 1
16+
# * * * 2 1
17+
# * * 3 2 1
18+
# * 4 3 2 1
19+
# 5 4 3 2 1

Numeric Patterns/numericpattern154.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
height = int(input())
2+
3+
for i in range(1,height+1):
4+
5+
for j in range(1,i):
6+
print("*",end=" ")
7+
8+
for j in range(height-i+1,0,-1):
9+
print(height-i+1,end=" ")
10+
11+
print()
12+
13+
# Sample Input :- 5
14+
# Output :-
15+
# 5 5 5 5 5
16+
# * 4 4 4 4
17+
# * * 3 3 3
18+
# * * * 2 2
19+
# * * * * 1

Numeric Patterns/numericpattern155.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
height = int(input())
2+
3+
for i in range(1,height+1):
4+
5+
for j in range(1,i):
6+
print("*",end=" ")
7+
8+
for j in range(height-i+1,0,-1):
9+
print(j,end=" ")
10+
11+
print()
12+
13+
# Sample Input :- 5
14+
# Output :-
15+
# 5 4 3 2 1
16+
# * 4 3 2 1
17+
# * * 3 2 1
18+
# * * * 2 1
19+
# * * * * 1

Numeric Patterns/numericpattern160.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
height = int(input())
2+
3+
for i in range(1,height+1):
4+
5+
for j in range(1,height+1):
6+
7+
if(i == height - j + 1) :
8+
print("*",end=" ")
9+
10+
else :
11+
print(j,end=" ")
12+
13+
print()
14+
15+
# Sample Input :- 5
16+
# Output :-
17+
# 1 2 3 4 *
18+
# 1 2 3 * 5
19+
# 1 2 * 4 5
20+
# 1 * 3 4 5
21+
# * 2 3 4 5

Numeric Patterns/numericpattern161.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
height = int(input())
2+
x = 1
3+
4+
for i in range(0,height):
5+
6+
for j in range(0, height):
7+
8+
if((i % 2 == 0 and j % 2 == 0) or (i % 2 != 0 and j % 2 != 0)) :
9+
print(" *",end=" ")
10+
11+
else :
12+
if(x <= 9):
13+
print("",x,end=" ")
14+
15+
else:
16+
print(x,end=" ")
17+
x += 1
18+
19+
print()
20+
21+
# Sample Input :- 5
22+
# Output :-
23+
# * 1 * 2 *
24+
# 3 * 4 * 5
25+
# * 6 * 7 *
26+
# 8 * 9 * 10
27+
# * 11 * 12 *

0 commit comments

Comments
 (0)