Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| course_planning:computation:common_mistakes [2015/09/24 23:24] – created obsniukm | course_planning:computation:common_mistakes [2015/09/25 13:40] (current) – [Indentation issues] obsniukm | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Common | + | ~~NOTOC~~ |
| + | |||
| + | ====== Common | ||
| + | |||
| + | ==== Multiplication ==== | ||
| + | |||
| + | When multiplying two numbers, | ||
| + | <code python> | ||
| + | number3 = (number1)(number2) | ||
| + | </ | ||
| + | will throw an error. | ||
| + | <code python> | ||
| + | number3 = number1*number2 | ||
| + | </ | ||
| + | |||
| + | ==== Raising number to a power ==== | ||
| + | |||
| + | Raising to a power with a caret | ||
| + | <code python> | ||
| + | numraisedton = num^n | ||
| + | </ | ||
| + | will throw an error. | ||
| + | <code python> | ||
| + | numraisedton = num**n | ||
| + | </ | ||
| + | |||
| + | ==== Indentation issues ==== | ||
| + | |||
| + | 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 | ||
| + | - **Format > Dedent Region** ( ⌘[ ) | ||
| + | - **Format > Indent Region** ( ⌘] ) | ||