반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- matplotlib
- Github
- Kotlin
- 파이썬
- hive
- PySpark
- list
- Mac
- c#
- Tkinter
- Redshift
- google apps script
- math
- array
- numpy
- Apache
- Google Spreadsheet
- Google Excel
- PostgreSQL
- Excel
- Python
- SQL
- django
- dataframe
- Java
- GIT
- gas
- string
- PANDAS
Archives
- Today
- Total
목록! (3)
달나라 노트
Google Apps Script : 논리 연산자, Logical operator (&&, ||, !)
논리 연산자에 대해 알아봅시다. 논리 연산자라고 하면 and, or, not을 의미합니다. Operator Description Example A && B and A와 B 모두 true여야만 true return A와 B 중 하나라도 false라면 false return true && true -> true true && false -> false false && true -> false false && false -> false || or A와 B 중 하나라도 true라면 true return A와 B 모두 false여야만 false return true && true -> true true && false -> true false && true -> true false && false -> false..
Google Apps Script
2022. 11. 22. 20:42
Python math : factorial() (!, factorial, 팩토리얼)
math library의 factorial() method는 특정 숫자의 factorial 값을 return합니다. Syntax math.factorial(x) x는 숫자입니다. 전달받은 x의 팩토리얼 값을 return합니다. 팩토리얼 값을 계산하기 때문에 x는 양의 정수만을 받습니다. (실수, 음수 등을 전달하면 error가 발생합니다.) 예시를 봅시다. import math print(math.factorial(5)) -- Result 120 - math.factorial(5) 5!의 값을 계산하여 return합니다. 5! = 5 * 4 * 3 * 2 * 1 = 120 이므로 120이 return됩니다.
Python/Python math
2022. 11. 8. 21:07