← the terminal · instructor

W18 // STRINGS, MATH, PROMPT

JAN 13 · Ch 7 Sec 5-7 · DUE: Assignment: greeting calculator

This week's deckPPTX

// RUN OF SHOW (8:45-10:15)
8:45

Stand-up: last week's deliverable graded, questions answered

9:00

This week's presentation

9:20

At the keyboard: guided type-along

9:45

Build time: assignment or project work

10:10

Close: commit, push, and preview next week's reading

// THE POINT THIS WEEK
Concatenation and template literals. Math operators. Input with prompt.
// TALKING POINTS
Strings do work
  • Concatenation glues strings with +
  • Template literals use backticks and ${slots}: cleaner, calmer
  • prompt() asks the user a question and hands you their answer
Math without mystery
  • + - * / do what they say; % gives the remainder after division
  • Remainder is secretly everywhere: even/odd, cycles, clocks
  • Numbers from prompt arrive as strings; convert before you calculate
> TREASURE HUNT WEEK

The String Cipher opens today: student door · foreman key. Badge K. Run it in the build block or assign as the week's warm-down.

// LINKS