Skip to content

Commit a931114

Browse files
authored
Update 4.py
1 parent b137f6a commit a931114

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

5/4.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
def recursive_function(i):
2-
# 100번째 출력을 했을 때 종료되도록 종료 조건 명시
2+
# 100번째 호출을 했을 때 종료되도록 종료 조건 명시
33
if i == 100:
44
return
5-
print('재귀 함수를 호출합니다.')
5+
print(i, '번째 재귀함수에서', i + 1, '번째 재귀함수를 호출합니다.')
66
recursive_function(i + 1)
7+
print(i, '번째 재귀함수를 종료합니다.')
78

8-
recursive_function(0)
9+
recursive_function(1)

0 commit comments

Comments
 (0)