Mix.install([
{:jason, "~> 1.4"},
{:kino, "~> 0.9", override: true},
{:youtube, github: "brooklinjazz/youtube"},
{:hidden_cell, github: "brooklinjazz/hidden_cell"}
])
As developers, it's our job to translate business requirements into something that the computer understands.
These exercises will have you convert a common formula into an Elixir program.
We often need to display loading bars to the user. Loading bars use the current percentage they have finished loading in order to display the loading progress.
You can calculate the percentage with
For example if we complete 7
out of 10
items, we would be 70.0%
complete.
(7 / 10) * 100 # 70.0
Use arithmetic operators to determine the percentage given we have completed 12
out of 42
items.
Example solution
actual = 12
total = 42
(actual / total) * 100
Enter your solution below.
We're building a rocket ship app to teach people about physics.
Users can enter the mass
and acceleration
of a ship to visualize the force
generated.
Given that 10
and acceleration is 50
.
Example solution
mass = 10
acceleration = 50
mass * acceleration
Enter your solution below.
It's common in many cultures to leave a tip whenever you buy a meal. It's common to calculate the tip as a percentage of the meal.
Given the initial cost of a meal is 20
, and you want to leave a 15%
tip, use arithmetic operators to determine the total cost of the meal.
Example solution
initial_cost = 20
tip_percent = 1.15
initial_cost * tip_percent
Enter your solution below.
To calculate the longest side of a triangle we use
Given a triangle where side 4
, and side 10
, calculate
Example solution
a = 4
b = 10
a ** 2 + b ** 2
Enter your solution below.
Earlier we calculated 116
determine the square root of
Example solution
c_squared = 116
:math.sqrt(c_squared)
Enter your solution below.
DockYard Academy now recommends you use the latest Release rather than forking or cloning our repository.
Run git status
to ensure there are no undesirable changes.
Then run the following in your command line from the curriculum
folder to commit your progress.
$ git add .
$ git commit -m "finish Fun Formulas exercise"
$ git push
We're proud to offer our open-source curriculum free of charge for anyone to learn from at their own pace.
We also offer a paid course where you can learn from an instructor alongside a cohort of your peers. We will accept applications for the June-August 2023 cohort soon.