생활코딩 python 입문수업 4.0 데이터 타입~
[4.1 number type]
int 정수형 float 실수형
sqrt : 제곱근
ex) sqrt(4) = 2
pow : 제곱
ex) pow(4,2) : 4^2 = 16
import.math
print(math.~
import : 여러가지 기능을 가진 모듈( ex)math )을 실행시킴
[4.2 문자열 데이터 타입]
print (" '1'+'1' ", '1'+'1')
이 문장에서의 +는 산술연산자가 아닌 문자열('1')과 문자열을 결합하는 결합 연산자임.
print('Hello world'.replace('Hello', 'Bye')
= Bye world
댓글 영역