1-2 算術運算
age = 20
print(age)20a = 10 * 5
print(a)50a = 120 // 9 #求商數
b = 35 % 3 #求餘數
c = 2 ** 3 #求次方area = (5 + 10) * 8 / 2
print(area)60.0

Last updated
age = 20
print(age)20a = 10 * 5
print(a)50a = 120 // 9 #求商數
b = 35 % 3 #求餘數
c = 2 ** 3 #求次方area = (5 + 10) * 8 / 2
print(area)60.0

Last updated
print((5 + 10) * 8 / 2))#計算梯形面積
print((5 + 10) * 8 / 2))#梯形數據
top = 5 #上底
bottom = 10 #下底
height = 8 #高
#計算面積
area = (top + bottom) * height / 2
#印出面積
print((5 + 10) * 8 / 2))a = 2**100 #計算2的100次方
print(a)1267650600228229401496703205376