Skip to content

Commit 97ae97f

Browse files
simple recursion
1 parent b101500 commit 97ae97f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
3+
4+
def printFun(test):
5+
6+
if (test < 1):
7+
return
8+
else:
9+
10+
print( test,end = " ")
11+
printFun(test-1) # statement 2
12+
print( test,end = " ")
13+
return
14+
15+
16+
test = 3
17+
printFun(test)

0 commit comments

Comments
 (0)