프롬프트 없음
math 모듈을 사용하여 제곱근을 계산해 보세요.import math
# 제곱근 계산
number = 16
result = math.sqrt(number)
print(f"{number}의 제곱근은 {result}입니다.")
pandas 라이브러리는 다양한 모듈을 포함하고 있습니다.requests 라이브러리를 사용하여 웹 페이지의 HTML 코드를 가져와 보세요.import requests
# 웹 페이지 요청
url = "https://www.example.com"
response = requests.get(url)
# HTML 출력
print(response.text)
# 모듈 사용 예
import math # math는 모듈
print(math.pi) # 원주율 출력
# 라이브러리 사용 예
import requests # requests는 라이브러리
response = requests.get("https://api.github.com")
print(response.status_code) # 응답 상태 코드 출력