Powered by AppSignal & Oban Pro
Would you like to see your link here? Contact us

Integers

arithmetic.livemd

Integers

Mix.install([
  {:kino, github: "livebook-dev/kino", override: true},
  {:kino_lab, "~> 0.1.0-dev", github: "jonatanklosko/kino_lab"},
  {:vega_lite, "~> 0.1.4"},
  {:kino_vega_lite, "~> 0.1.1"},
  {:benchee, "~> 0.1"},
  {:ecto, "~> 3.7"},
  {:math, "~> 0.7.0"},
  {:faker, "~> 0.17.0"},
  {:utils, path: "#{__DIR__}/../utils"},
  {:tested_cell, git: "https://github.com/BrooklinJazz/tested_cell"}
])

Navigation

Return Home Report An Issue

Setup

Ensure you type the ea keyboard shortcut to evaluate all Elixir cells before starting. Alternatively you can evaluate the Elixir cells as you read.

Balance the Scale

Use Integers to balance the scale.

For example, if 10 were on the left and 20 were on the right, you would add 10 to the left or add -10 to the right.

flowchart LR
Left --- Right
subgraph Right
100
end

subgraph Left
10
end
Kino.Input.number("add ___ to the left")
flowchart LR
Left --- Right

subgraph Left
17
end

subgraph Right
13
2
5
end
Kino.Input.number("add ___ to the left")
flowchart LR
Left --- Right

subgraph Left
20
end

subgraph Right
5
19
1
end
Kino.Input.number("add ___ from the right")
flowchart LR
Left --- Right

subgraph Left
-5
10
end

subgraph Right
1
2
end
Kino.Input.number("add ___ to the right")
flowchart LR
Left --- Right

subgraph Left
A[10 * 10]
20
end

subgraph Right
110
end
Kino.Input.number("add ___ to the right")
flowchart LR
Left --- Right

subgraph Left
A[20 - 5]
10
end

subgraph Right
  20
end
Kino.Input.number("add ___ to the right")
flowchart LR
Left --- Right

subgraph Left
25
end

subgraph Right
20
end
Kino.Input.number("add ___ to the left")

Solve For X

In the Elixir cells below, enter the result of the equation. You should use Arithmetic Operators rather than solving the equation.

Four plus 3 times 10.

Ten times ten times ten.

Ten to the power of two hundred and one.

Ten minus fourteen plus twelve.

The remainder of 10 / 3.

200 divided by 3.

Half of 214.

75% of 456.

Ten minus two times 5.

(Ten minus two) times 5.

Divide 10 by 3.

Use integer division to divide 10 by 3.

Ten minus two times 10 to the power of 2.

Negative ten plus four.

Five plus negative six minus negative two.

60 percent of 5 plus four.

Seventy divided by (ten plus two).

Commit Your Progress

Run the following in your command line from the project folder to track and save your progress in a Git commit.

$ git add .
$ git commit -m "finish arithmetic exercise"