Skip to content

Instantly share code, notes, and snippets.

@hugobarauna
Created October 11, 2023 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hugobarauna/29f72bb2b4a69566cc5b7d04b6da6bfe to your computer and use it in GitHub Desktop.
Save hugobarauna/29f72bb2b4a69566cc5b7d04b6da6bfe to your computer and use it in GitHub Desktop.
Example of how to use a Livebook notebook for teaching purposes

Example of using a Livebook notebook for teaching

Mix.install([
  {:hidden_cell, github: "brooklinjazz/hidden_cell"}
])

How to use this notebook

This notebook contains some instructions for you to write code. And if you need help, there will be some code hidden under a hint, so you can copy'n paste the code solution in case you need it.

Simple hello world

Write one line of code that prints Hello World!.

# write you solution here
💡 hint
IO.puts("Hello World!")

Hello world with a module

Write a Hello World using a module and function definition.

# write your solution here
💡 hint
defmodule HelloWorld do
  def run() do
    IO.puts("Hello World!")
  end
end

Hello world with a module

Write a Hello World using a module and function definition.

# write your solution here
defmodule HelloWorld do
  def run do
    IO.puts("Hello World!")
  end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment