python in operator types code example
Example 1: operators in python
# Python Operators
Operator Name Example
+ Addition x + y
- Subtraction x - y
* Multiplication x * y
/ Division x / y
% Modulus x % y
** Exponentiation x ** y
// Floor division x // y
Example 2: python exponent operator
#python exponent operator
num = 2
new_num = num**2
#answer would be 4