Skip to content

Commit 85d1cab

Browse files
authored
Update rcrsn_ptrn.py
1 parent 774d635 commit 85d1cab

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

codes_in_Aug2025/rcrsn_ptrn.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
def star_ptrn(n):
22
if n == 0:
3-
print("No pattern for zero row.")
43
return
54
elif n < 0:
65
print("Negative intezers are not allowed.")
7-
return
6+
return
87
else:
98
print("*" * n)
10-
star_ptrn(n - 1)
9+
star_ptrn(n-1)
10+
1111
n = int(input("Enter the number of rows: "))
1212
star_ptrn(n)
1313

14+

0 commit comments

Comments
 (0)