Expressions and variables basic expressions (solution)

Exercise

Write the following calculations in your text editor.

  1. 2 - 10
  2. 3 * 5
  3. 9 / 2
  4. 5 - 3 * 2
  5. (5 - 3) * 2
  6. 4 ^ 2
  7. 8 / 2 ^ 2
Output solution
[1] -8
[1] 15
[1] 4.5
[1] -1
[1] 4
[1] 16
[1] 2