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

Size square stencils

0 XP earned
Julia track: IntermediateMission: BeginnerBroadcastingVector arithmeticExponentiation
Before you start this intermediate track

Numeric arrays and functions. Work with ranges, broadcasting, and matrix coordinates.

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

x
0 / 6 challenges
KNOWLEDGE CHECK

Predict the result.

Which stencil areas are printed?

array_lab.jl
sides = [2, 3, 5]areas = sides .^ 2report = join(areas, ", ")println(report)

Each mission is a standalone Julia 1.x script using Base. Arrays use their standard one-based indices. Run a single snippet with julia; no packages or input files are required.

Review the lesson

A dot turns a Julia operation into an element-by-element calculation called broadcasting. A stencil maker stores square side lengths in a vector and squares each length to find its area. The .^ operation produces a new vector. join makes the results easy to read as a compact line.

Choose your answer+25 XP on first completion