반응형
    
    
    
  [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
반응형
    
    
    
  '프로그래밍 > Python' 카테고리의 다른 글
| python Quiz - What will be the datatype of the var in the below code snippet? (0) | 2023.04.07 | 
|---|---|
| [python] 구문 퀴즈, 파이썬 (0) | 2023.03.29 | 
| [PYTHON] 모듈 예제, 모듈 불러오기- 파이썬 (0) | 2023.03.21 | 
| [python] 파이썬 모듈 예제 (0) | 2023.03.21 | 
| 파이썬 제어문 python control-flow (0) | 2023.03.17 | 
