Lesson 2: Everything is a file
Level 1, Meet Your Computer. Open files and read their endings: .png, .txt, .mp3, .py. The new word: file ending. It follows lesson 1, Computers follow instructions. Next comes lesson 3, Folders keep things tidy.
What the lesson explains
Everything is a file. A photo, a song, a story: all files. This window is a file explorer. It shows what is saved on a computer.
Every file has an ending. The letters after the dot. cat = the name; .png = the ending.
The ending says what is inside. Like the label on a lunchbox. .png 🖼️ picture; .txt 📄 text; .mp3 🎵 sound; .py 🐍 code.
Open a file to see inside. Click it, then Open. Or double-click it.
What you do first
Open the picture. Open cat.png (a picture) at C:\Users\you\Documents\cat.png. Inside: "🐱".
The files on the practice computer
This lesson works in one folder. At the start, Documents holds cat.png, hello.py, notes.txt, song.mp3, story.txt.
You change nothing here, so lesson 3 finds the same files.
What you practise
Try it, "Open the picture": Open cat.png (a picture) at C:\Users\you\Documents\cat.png. Inside: "🐱".
Mini practice, "Open two more files": Open notes.txt (plain text) at C:\Users\you\Documents\notes.txt. Inside: "Feed the cat 🐱". Then: Open hello.py (Python code) at C:\Users\you\Documents\hello.py. Inside: "print("Hello")".
Sort by ending, "Put each file in its bin": Sort 6 files by their ending: dog.png goes in Pictures, drums.mp3 goes in Sounds, list.txt goes in Text, game.py goes in Code, photo.jpg goes in Pictures, poem.txt goes in Text.
In your head, "What is inside?": What is inside story.txt? The answer: "Words to read".
What PlayBuddy and PlayType say
PlayType: "Welcome to lesson two!"
PlayBuddy: "A photo, a song, a story. On a computer, each one is a file."
PlayType: "Look at the ending after the dot. It tells you what kind of file it is."
PlayBuddy: "It is like the label on a lunchbox. You know what is inside."
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 10 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.