Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| course_planning:computation:common_mistakes [2015/09/25 00:02] – [Raising to a power] obsniukm | course_planning:computation:common_mistakes [2015/09/25 13:40] (current) – [Indentation issues] obsniukm | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ~~NOTOC~~ | ||
| + | |||
| ====== Common easily overlooked mistakes ====== | ====== Common easily overlooked mistakes ====== | ||
| ==== Multiplication ==== | ==== Multiplication ==== | ||
| - | Unordered List ItemWhen | + | When multiplying two numbers, |
| <code python> | <code python> | ||
| - | number3=(number1)(number2) | + | number3 = (number1)(number2) |
| </ | </ | ||
| will throw an error. | will throw an error. | ||
| <code python> | <code python> | ||
| - | number3=number1*number2 | + | number3 = number1*number2 |
| </ | </ | ||
| Line 23: | Line 25: | ||
| </ | </ | ||
| - | ==== Squaring a vector | + | ==== Indentation issues |
| - | You can't just raise a vector a power like | + | If an indentation error is given, select the entire indented region where the indentation error is probably located (check in the region they last made an edit) and |
| - | <code python> | + | |
| - | vectorraisedton = vector**n | + | - **Format |
| - | </code> | + | |
| - | Rather, you need to raise its magnitude: | + | |
| - | <code python> | + | |
| - | vectorraisedton = mag(vector)**n | + | |
| - | </code> | + | |