Skip to content

Commit 50d8c32

Browse files
numberic pattern 232 and 233 solved
1 parent 1e60d99 commit 50d8c32

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

Numeric Patterns/numericpattern232.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
for i in range(1,6):
2+
for j in range(1,6):
3+
if i==int(5/2)+1 or j==int(5/2)+1:
4+
if abs(i-j)==2:
5+
print(1,end=' ')
6+
elif abs(i-j)==1:
7+
print(2,end=' ')
8+
else:
9+
print(3,end=' ')
10+
else:
11+
print(" ",end=' ')
12+
print(end='\n')

Numeric Patterns/numericpattern233.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
for i in range(1,6):
2+
for j in range(1,6):
3+
if i==int(5/2)+1 or j==int(5/2)+1:
4+
print(abs(i-j),end=' ')
5+
else:
6+
print(" ",end=' ')
7+
print(end='\n')

0 commit comments

Comments
 (0)