Fungsi Matematika Python
import math
x = dir(math)
print(x)
Rick Astley
import math
x = dir(math)
print(x)
cmath.e Returns Euler's number (2.7182...)
cmath.inf Returns a floating-point positive infinity value
cmath.infj Returns a complex infinity value
cmath.nan Returns floating-point NaN (Not a Number) value
cmath.nanj Returns coplext NaN (Not a Number) value
cmath.pi Returns PI (3.1415...)
cmath.tau Returns tau (6.2831...)
import math
print(math.sqrt(4))
#math function in python:
def math(x,y):
z = x * y
return z
A = math(7,8)
print(A)
x = int(10)
y = int(5)
print(x * y)
#you need to add integer extra otherwise
# python will count this as a str and won't work.
#copy the code to your py script to see the accurate result.
x = int(10)
y = int(5)
print(x + y)
#you need to define integer extra otherwise
# python will count this as a str and won't work.
#copy the code to your py script to see the accurate result.