We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 396f585 commit a21792aCopy full SHA for a21792a
06 Patterns2/Mirror Number Pattern.py
@@ -0,0 +1,40 @@
1
+'''
2
+Problem statement
3
+Print the following pattern for the given N number of rows.
4
+
5
+Pattern for N = 4
6
7
8
9
10
+The dots represent spaces.
11
12
13
14
+Detailed explanation ( Input/output format, Notes, Images )
15
+Constraints
16
+0 <= N <= 50
17
+Sample Input 1:
18
+3
19
+Sample Output 1:
20
+ 1
21
+ 12
22
+ 123
23
+Sample Input 2:
24
+4
25
+Sample Output 2:
26
27
28
29
+1234
30
31
32
+## Read input as specified in the question
33
+n = int(input())
34
+## Print the required output in given format
35
+for i in range(1,n+1):
36
+ for s in range(1,n-i+1):
37
+ print(" ",end="")
38
+ for j in range(1,i+1):
39
+ print(j, end="")
40
+ print()
0 commit comments