Color theme
0 day streak0 XPP1
ElixirQuiz mode
MISSION 1 OF 3

Unpack a telescope result

0 XP earned
Elixir track: AdvancedMission: IntermediateTuplesAtomsPattern matching
Before you start this advanced track

Functions and collections. Work with immutable data, tuples, atoms, and pattern matching.

Guided code reading and debugging. Runnable coding challenges are available in JavaScript, Python, and SQL.

x
0 / 6 challenges
KNOWLEDGE CHECK

Predict the result.

What status report is printed?

observatory.exs
result = {:ok, "aligned"}{:ok, message} = resultreport = "Telescope: " <> messageIO.puts(report)

Each mission is a standalone Elixir script run with elixir. Only standard-library modules are used. Answers describe printed output, excluding any extra value an interactive IEx session would echo.

Review the lesson

An Elixir tuple can carry a status atom alongside a message. Pattern matching checks that its shape and status match what the program expects, then binds the message to a variable. The <> operator joins strings. This compact pattern is useful for handling successful results returned by other functions.

Choose your answer+25 XP on first completion