일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- GIT
- table
- plugin
- hadoop
- SQL
- react
- MSSQL
- IntelliJ
- Express
- Python
- Sqoop
- NPM
- vaadin
- xPlatform
- es6
- Java
- R
- tomcat
- window
- mapreduce
- Android
- 보조정렬
- SPC
- SSL
- Eclipse
- 공정능력
- Spring
- mybatis
- Kotlin
- JavaScript
- Today
- Total
목록2019/05/04 (5)
DBILITY
javascript나 c언어의 일반적인 함수 구조를 생각하면 되겠다. function 대신 def를 사용한다. #반환값이 없는 경우 >>> def print_ntimes(n): for i in range(1,n+1): print("hello~"+str(i)) >>> print_ntimes(3) hello~1 hello~2 hello~3 #반환값이 있는 경우 >>> def plus(x,y): return x+y >>> z=plus(1,2) >>> z 3 >>> def minus(x,y): return(x-y,"음수사원 굴정지인") >>> type(minus) >>> (x,y)=minus(1,2) >>> x -1 >>> y '음수사원 굴정지인' >>> z=minus(1,2) >>> z (-1, '음수사원 굴..
여타 언어들처럼 아래와 같다. 블럭을 대부분 brace {....}로 구분을 하는데, 파이썬은 indent로 한다.주의가 필요하겠다. 각 제어문의 마지막에 colon : 이 있어야 한다. 조건(분기)문 >>> x=1 >>> y=0.9999999999999999999 >>> type(x) >>> type(y) >>> if x==y : print("equal") else: print("not equal") not equal if x>> if x == y : print("equal") elif x > y: print("x is greater than") else: print("x is less than") x is greater than 반복문 >>> for i in (1,2,3,4,5,6,7,8,9,10):..
그냥 이렇다.. >>> x=1 >>> y=float(1) >>> x==y True >>> x 1 >>> y 1.0 >>> x!=y False >>> x>y False >>> x>> x>=y True >>> x>>
정수형(int) >>> x=123 >>> type(x) >>> x=int(123) >>> type(x) 실수형(float) >>> x='1.0' >>> type(x) >>> x=float(x) >>> type(x) >>> x 1.0 문자열(str) >>> x='python' >>> type(x) >>> x=str('python') >>> type(x) >>> 불리언(boolean) >>> x=True >>> type(x) >>> x=bool(1) >>> type(x) >>> x True >>> x=bool(0) >>> type(x) >>> x False 리스트(list) x = [1,2,3,4,5] 형태로 추가,수정,삭제 가능 x.append(6) 뒤에 6이 추가된다. del x[5] 5번 인덱스의 값이..
python만 설치할 때는 https://www.python.org/downloads/ Download Python The official home of the Python Programming Language www.python.org 아나콘다로 설치할 때는 다음과 같다. Anaconda 설치 ( https://www.anaconda.com/distribution ) idle.bat 실행 ( 바탕화면 바로가기 생성 필요) python shell 실행화면 폰트 설정