-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpatern10.py
More file actions
26 lines (20 loc) · 451 Bytes
/
Copy pathpatern10.py
File metadata and controls
26 lines (20 loc) · 451 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
n = int(input())
row = 1
while row <= n:
#Print karo space (1st triangle)
space = n - row
while space:
print(" ", end="")
space = space - 1
#print 2nd triangle
j = 1
while j <= row:
print(j, end="")
j = j + 1
#print 3rd triangle
start = row - 1
while start:
print(start, end="")
start = start - 1
print()
row = row + 1