Python has a number of basic operators including some arithmetic operators.
An arithmetic operator takes numerical values as an input and returns a single numerical value, manipulating the input values in a certain way as directed by the operator.
One important basic arithmetic operator, in Python, is the exponent operator. It takes in two real numbers as input arguments and returns a single number.
The operator that can be used to perform the exponent arithmetic in Python is
Given two real number operands, one on each side of the operator, it performs the exponential calculation (
2**5 translates to
Note: Exponent operator
**in Python works in the same way as the
Here are some examples that show how to use the
print('2**5 evaluates to: ', 2**5) print('1**13 evaluates to: ', 1.1**13) print('32**2 evaluates to: ' , 32**2.2)
View all Courses