How to Write Your First Program
Learn the basics of coding by writing your very first computer program using simple commands. HowTo: Family Edition: family how-tos that actually help.
- Pick your coding environment. Open your web browser and go to a site like Scratch or Code.org. These sites use blocks to help you see how code works without needing to type complex words.
- Start a new project. Look for a button that says 'Create' or 'Start Coding'. Click it to open your workspace, which is where you will build your program.
- Add your first command. Find a block that says something like 'Move 10 steps' or 'Say Hello'. Drag it into the middle of your screen and click it to see what happens.
- Combine your blocks. Stack two or three blocks together. For example, try adding a 'Wait' block between a 'Move' block and a 'Turn' block. Click the stack to run your program.