+ 6
WHAT DOES ** MEANS IN PYTHON?
I have seen many questions which contain **. What does it means? Eg:- print(2**8). What would it return?
21 Réponses
+ 9
** power operator in python.
2**3 => 2*2*2
4**4 => 4*4*4*4
+ 6
This ** is the same thing as raise to the power of in mathematics
e.g 2**3 is also known as 2 raise to the power of 3 = 2*2*2
Hope it was helpful
+ 6
HUMANOID ANIME print (2**8) will return 256.
i.e 2*2*2*2*2*2*2*2 = 256
(2 multiplies itself 8 times)
The ** is referred to as the power operator. It multiplies a number a certain number of times by itself base on the number after the **
Jayakrishna🇮🇳 and Destiny Simon has given a nice example.
+ 3
they are called exponentiation Exponentiation raises one number (the base) to the power of the other (the exponent). For example, 2**3 is 8, since 2**3 means “give me 2 * 2 * 2” (2 multiplied together 3 times).
+ 3
** is the power of the number
+ 3
Power
eg: 2**2 = 4
3**2 = 9
+ 3
It is the power operator calculates the power of a number.
2**2 => square of two, same as 2*2
2**3 => two to the power of three, same as 2*2*2
You can also calculate root by ** operator using 1/number as the exponent
2**(1/2) => square root of two
2**(1/3) => cube root of two
Be careful with parenthesis. ** has higher precedence than /
2**1/3 => this does not mean cube root. It is equal to two to the power of 1 and then divided by 3
In general
2 ** (2/3) => cube root of square of 2
+ 2
exponential operator:
For example:
3**2 = 3*3
Or,
6*4 = 6*6*6*6
Hope you understand the concept of exponent.
+ 1
Power operator
+ 1
It means power of
The eg you gave ie, 2**8 means 2 to the power of 8
+ 1
Emms noted thanks
+ 1
When you code this * is in math like this 2*3 and the answer is 6 right well I think then that if you use ** then it will double it that is what I think
+ 1
Exponents
+ 1
x**y=multiply x, y times
+ 1
That's a power operator and returns powers of given number.
If we give print(2**5),it return 32 as an answer.
As, 2*2*2*2*2 = 32
+ 1
It means power , 2 ** 3 is , 2 power 3 , which equal to 8
+ 1
es el operador de potencia:
por ejemplo 2**2 = 4
2**3 = 8
2**4 = 16
2**8 = 256
inténtalo con esto:
print(2**2)
+ 1
When we take for example,
1000 is the answer and print the way of operators
Then,10*10*10
=10**
When we have to print it in times then,
10**3
Here,3 is ,how many time the element have to be printed
Easy 😜👍
0
it acts like an exponetial
for example 2^3=8
2**8 will run to 256