프로그래밍/Python
[python] 구문 퀴즈, 파이썬
홍반장水_
2023. 3. 23. 23:15
반응형
[python] 구문 퀴즈, 파이썬
"""
# What will be the output?
A.Infinite loop
B.120
C.47
D.48
"""
def rec(a,b):
if a == 0:
return b
else:
return rec(a - 1, a + b)
print(rec(8, 12))
# 48
반응형