We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a223620 commit 629c1a9Copy full SHA for 629c1a9
Recursion/triangle_pattern.py
@@ -0,0 +1,33 @@
1
+def reversePattern(row, column):
2
+ if row == 0:
3
+ return
4
+
5
+ if row > column:
6
+ print('*', end = " ")
7
+ column += 1
8
+ else:
9
+ print()
10
+ row -= 1
11
+ column = 0
12
13
+ reversePattern(row, column)
14
15
+reversePattern(4, 0)
16
17
+print()
18
19
+def pattern(row, column):
20
21
22
23
24
25
+ pattern(row, column)
26
27
28
29
30
31
32
33
+pattern(4, 0)
0 commit comments