This is an old revision of the document!
Common easily overlooked mistakes
Multiplication
Unordered List ItemWhen multiplying two numbers,
number3=(number1)(number2)
will throw an error. Asterisks must be used:
number3=number1*number2
Raising to a power
Raising to a power with a caret
numraisedton = num^n
will throw an error. You need to use double asterisks:
numraisedton = num**n
Squaring a vector
You can't just raise a vector a power like
vectorraisedton = vector**n <code> Rather, you need to raise its magnitude: <code python> vectorraisedton = mag(vector)**n