PROGRESS
2 / 10
QUESTION 02 #662
math 모듈의 다양한 수학 함수를 사용합니다. 빈칸에 들어갈 알맞은 함수명을 채우세요.
main.py
import math
print("sin(pi/4) : %.2f" % math.sin(math.pi/4))
print("cos(pi) : %.2f" % math.cos(math.pi))
print("tan(pi/6) : %.2f" % math.tan(math.pi/6))
print("5의 3승 : %d" % math.pow(5,3))
print("144의 제곱근 : %d" % (144))
print("log10(1000) : %.2f" % math.log10(1000))
HINT
math.sqrt(x)는 x의 제곱근. math.pow(a,b)는 a의 b승.
실행 결과 예시
sin(pi/4) : 0.71 cos(pi) : -1.00 tan(pi/6) : 0.58 5의 3승 : 125 144의 제곱근 : 12 log10(1000) : 3.00
INTERACTIVE SHELL
Shift + Enter 로 즉시 실행