Math Commands in Python



Python has useful commands for preforming calculations.

Below are two tables that refer to some math commands:-

Table: 1
Command ValueDescription
abs(value)Absolute Value
ceil(value)Rounds Up
cos(value)Cosine, in radians
floor(value)Rounds Down
log(value)Logarithm, Base e
log10(value)Logarithm, Base 10
max(value1, value2)Larger of Two or More Values
min(value1,value2)Smaller of Two or More Values
round(value)Nearest Whole Number
sin(value)Sine, in radians
sqrt(value)Square Root
Table: 2
ConstantDescription
e2.7182818
pi3.1415926


2 thoughts on “Math Commands in Python

Leave a comment