0
Cany you please tell me about Exponentiation
I have tried to learn it but can't understand it .Please help|!!
4 Answers
+ 6
Exponentiation is x to the power of y, meaning x multipled by itself y times -- in coding usually represented by x**y, x^y or pow(x, y).
Two special cases to be noted:
x**0 = 1
x**1 = x
0**0 is an ultra-special case and equals 1
Other, mundane cases are as such:
2**0 = 1
2**1 = 2
2**2 = 2 * 2 = 4
2**3 = 2 * 2 * 2 = 8
2**4 = 2 * 2 * 2 * 2 = 16
and so on.
+ 4
http://mathinsight.org/exponentiation_basic_rules
https://en.wikipedia.org/wiki/Exponentiation
http://math.wikia.com/wiki/Exponentiation
^Use this to learn more about math.
https://docs.python.org/3/library/functions.html#pow
https://docs.python.org/3/library/math.html#math.pow
https://www.tutorialspoint.com/python/python_numbers.htm
^Use those to check out the math functions in Python.
0
I think its a bit like this right?
X=1
Y=1
while True:
X+=Y
Y+=1
Something like it in terms of maths anyway.
0
Wait, no actually... Sorry.