Windows PowerShell (practice mode: nothing here touches your real computer)
Lesson 20: Red text is a clue
Level 3, Terminal Power and Safety. Read an error message calmly, then fix the command. The new word: error message. It follows lesson 19, Dialects: PowerShell, CMD, Mac. Next comes lesson 21, Stop signs.
What the lesson explains
Red text is a clue. An error message says what went wrong.
The first line names it. Here the computer did not know the word dri. On the card: dri
What you do first
What went wrong?. The term 'dri' is not recognized as the name of a cmdlet. Why? The answer: "A spelling mistake".
The files on the practice computer
This lesson works in one folder. At the start, Documents\my-project holds backups\, club\, games\, images\, my-games\, hello.py, notes.txt, shopping.txt.
You change nothing here, so lesson 21 finds the same files.
What you practise
Error doctor, "What went wrong?": The term 'dri' is not recognized as the name of a cmdlet. Why? The answer: "A spelling mistake". Then: Cannot find path 'C:\Users\you\Documnets' because it does not exist. Why? The answer: "The folder name is spelt wrong". Then: 'images' is a folder. Use dir to see what's inside it. Which command was typed? The answer: "cat images".
Fix it, "Make the red go away": In the practice terminal, type cat images at the prompt PS C:\Users\you\Documents\my-project> and the computer answers: cat : 'images' is a folder. Use dir to see what's inside it.. Then: In the practice terminal, type dir images at the prompt PS C:\Users\you\Documents\my-project> and the computer answers: Directory: C:\Users\you\Documents\my-project\images / Mode Name / ---- ---- / -a--- cat.png.
What PlayBuddy and PlayType say
PlayBuddy: "Errors are clues. Today we become error doctors!"
PlayType: "Read the first line. It names the problem."
Help in every lesson
Everything happens on a pretend computer in your browser, so nothing touches your real files. PlayBuddy and PlayType stand beside the board, cheer you on and say when it is your turn.
A green ring shows where to click the first time. After that you do it on your own, and if you slip twice the ring comes back.
Stars
The lesson has 5 things to do. Up to one slip in ten gives three stars, up to one in four gives two, and finishing always gives at least one. Stars and progress are saved in this browser only; there is no account.
About DayOneCode
DayOneCode is an independent learning site, not affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic.