It is the power operator.
From the Python 3 docs:
The power operator has the same semantics as the built-in pow() function, when called with two arguments: it yields its left argument raised to the power of its right argument. The numeric arguments are first converted to a common type, and the result is of that type.
It is equivalent to 216 = 65536, or pow(2, 16)
how many errors are there in python? And do they all have different unique names?
Does anybody have a good Python book I can buy for my college class?
I would like the first line to call which number is being used for x on the same line.
So for example, I tried writing:
x = 1
y = 2
print ("the first number is" + x)
--------------------
I would like it to print "the first number is 1"
How come this doesn't work, but below, the same text being asked to print works but it needs to go on two separate lines?
x = 1
y = 2
print("x plus y evaluates to...")
print(x + y)
It is the power operator.
From the Python 3 docs:
The power operator has the same semantics as the built-in pow() function, when called with two arguments: it yields its left argument raised to the power of its right argument. The numeric arguments are first converted to a common type, and the result is of that type.
It is equivalent to 216 = 65536, or pow(2, 16)
http://docs.python.org/library/operator.html#mapping-operators-to-functions
a ** b = pow(a,b)