Created
January 7, 2017 02:28
-
-
Save yunho0130/84a5487552adb4cd02ce4b347165929a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Fri Dec 30 06:08:45 2016 | |
| @author: Yunho | |
| """ | |
| def factorial(a): | |
| if a == 1: | |
| print "크기가 1인 인형이 나옵니다." | |
| print "인형 꺼내기가 끝났습니다" | |
| return 1 | |
| else: | |
| print "크기가 {}인 인형이 나옵니다.".format(a) | |
| return a * factorial(a-1) | |
| factorial(4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment