#1利用math庫語句,獲得下列計算結果
#math.sin(2*math.pi)
import math
#math.sin代表正弦函式,math.pi代表π
result=math.sin(2*math.pi)
print(result)
#math.floor(-2.5)
#.floor向下取整數,返回不大於x的最大整數
result=math.floor(-2.5)
#math.ceil(3.5+math.floor(-2.5))
#math.ceil代表向上取整數返回不小於x的最大整數
result=math.ceil(3.5+math.floor(-2.5))
#round(math.fabs(-2.5))
#math.fabs(x)代表取x的絕對值
result=round(math.fabs(-2.5))
#math.log(math.e)
result=math.log(math.e)
#math.gcd(12,9)
#gcd代表最大公約數
result=math.gcd(12,9)
#math.fmod(36,5)
#代表%模運算
result=math.fmod(36,5)
#2.利用math庫將47度角轉化為弧度制,並將結果賦給一個變數
#math.radians將角度制轉化為弧度制
result=math.radians(47)
#3.利用math庫將π/7弧度制轉化為角度值
#math.degrees
result=math.degrees(math.pi/7)
#1利用math庫語句,獲得下列計算結果
#math.sin(2*math.pi)
import math
#math.sin代表正弦函式,math.pi代表π
result=math.sin(2*math.pi)
print(result)
#math.floor(-2.5)
#.floor向下取整數,返回不大於x的最大整數
result=math.floor(-2.5)
print(result)
#math.ceil(3.5+math.floor(-2.5))
#math.ceil代表向上取整數返回不小於x的最大整數
result=math.ceil(3.5+math.floor(-2.5))
print(result)
#round(math.fabs(-2.5))
#math.fabs(x)代表取x的絕對值
result=round(math.fabs(-2.5))
print(result)
#math.log(math.e)
result=math.log(math.e)
print(result)
#math.gcd(12,9)
#gcd代表最大公約數
result=math.gcd(12,9)
print(result)
#math.fmod(36,5)
#代表%模運算
result=math.fmod(36,5)
print(result)
#2.利用math庫將47度角轉化為弧度制,並將結果賦給一個變數
#math.radians將角度制轉化為弧度制
result=math.radians(47)
print(result)
#3.利用math庫將π/7弧度制轉化為角度值
#math.degrees
result=math.degrees(math.pi/7)
print(result)