連載目次 i = -1 f = -1.23 c = 1.0 + 1.0j # 組み込みのabs関数 result = abs(i) print(result) # 1 result = abs(f) print(result) # 1.23 result = abs(c) print(result) # 1.4142135623730951 # math.fabs関数 from math impo …
連載目次 i = -1 f = -1.23 c = 1.0 + 1.0j # 組み込みのabs関数 result = abs(i) print(result) # 1 result = abs(f) print(result) # 1.23 result = abs(c) print(result) # 1.4142135623730951 # math.fabs関数 from math impo …