CHAPTER 2
QuickStart Coding
Let’s get to it! In this chapter, you’ll gear up to write your first code — a tiny “Hello World!” program — the first real computer program most new coders write. After getting “Hello World!” up and running, you’ll prepare to code the fun projects that follow. You’ll get a big overview of the main programming language used in this book, Scratch, and a tiny overview of the text-based environment, Trinket, that you’ll use to play with Python. And finally, you’ll wrap up with how to solve errors that inevitably appear when coding. Let’s go!

Generated with AI using DALL·E – OpenAI
Preparing Yourself to Code
Coding is about inventing new ideas and bringing them to life through computer programs. Just as you prepare yourself to run a race or compete in a spelling bee, you can do certain things to get ready to code. Here are some tips:
- Follow examples. The code that you learn from examples can be used in many other programs.
- Plan and build. Start with a big-picture plan for your program, then break it down into algorithms.
- Be patient and keep going. Whether you’re coding or playing music, learning takes time. Stick with it, and you’ll get better.
- Use your creativity. Coding is about thinking in new ways! Step away from the screen, and come back with fresh ideas.
- Fix mistakes (bugs). Your code won’t always work on the first try. Be patient while debugging ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access