- #!/usr/bin/python
- import math
-
- #ceil
- print math.ceil(3.14);
-
- #fabs, replace abs
- print math.fabs(-3.14);
-
- #factorial
- print math.factorial(10);
-
- #floor
- print math.floor(3.14);
-
- #fmod, replace %
- print math.fmod(10, 3);
-
- #fsum, replace sum
- print math.fsum(range(10));
-
- #round, is not a function of math module
- print round(3.14, 1);
-
- #trunc
- print math.trunc(3.14);
-
- #!/usr/bin/python
- import math
-
- #exp
- print math.exp(2);
-
- #log
- print math.log(100, 10);
-
- #pow
- print math.pow(10, 2);
-
- #sqrt
- print math.sqrt(100);
-
- #!/usr/bin/python
- import math
-
- #exp
- print math.exp(2);
-
- #log
- print math.log(100, 10);
-
- #pow
- print math.pow(10, 2);
-
- #sqrt
- print math.sqrt(100);
-