LogIn E-mail
설계이야기
def factorial(n)
# 17 JMJS    19.11.11 10:09

def factorial(n):
        fact = 1
        for x in range(1, n+1):
                fact = fact * x
        return fact

print(factorial(5))
print(factorial(10))

게시물: 22 건, 현재: 1 / 1 쪽
[1]
번호 제       목 작성자 등록일 방문
23  모두의 파이썬 - 20일만에배우는 프로그래밍 기초 JMJS 20.1.8 137
22  python -m pip install -U pip JMJS 19.11.25 134
21  get =lambda i,m ... JMJS 19.11.13 147
20  2차원 리스트, 튜플 JMJS 19.11.13 121
19  [turtle]def polygon3(n,c,d) JMJS 19.11.11 127
18  [turtle]def polygon2(n,a) JMJS 19.11.11 133
17  def factorial(n) JMJS 19.11.11 127
16  def sum_func(n) JMJS 19.11.11 138
15  def hello() fun1(a) fun2(a,b) JMJS 19.11.11 140
14  while sum JMJS 19.11.11 118
13  random calculation JMJS 19.11.11 121
12  turtle random JMJS 19.11.11 126
11  import time time.time JMJS 19.11.11 134
10  turtle begin_fill end_fill JMJS 19.11.11 129
9  if else JMJS 19.11.11 123
8  input JMJS 19.11.11 131
7  list JMJS 19.11.11 143
6  turtle triangle JMJS 19.11.11 132
5  for range JMJS 19.11.11 117
4  모듈 사용하기 JMJS 19.11.11 139
3  import 파이썬 모듈 가져다 쓰기 JMJS 19.11.11 134
1  print 줄바꿈 JMJS 19.11.11 170
[1]