-
[recursive] 연습하기 좋은 간단한 재귀함수 문제들🐍 파이썬/파이썬 연습문제 2022. 8. 16. 08:02
1. print 0 to 10
2. compute factorial/ power
3. reverse the string
4. find max / min value in the list
def find_max(l): if len(l) == 0: return None if len(l) == 1: return l[0] max = find_max(l[1:]) if l[0] > max : return l[0] else: return max
5. print all values in nested list
'🐍 파이썬 > 파이썬 연습문제' 카테고리의 다른 글
[try구문] build a prompt with try/except (0) 2022.08.09 [inheritance] build a serializer (0) 2022.07.29 [inheritance] design an safe form the given UML (0) 2022.07.29 [Class] build a class that satisfies requirements (2) (0) 2022.07.27 [Class] build a class that satisfies requirements (1) (0) 2022.07.27