Level 1: Comments - IncrediCoders/Python1 GitHub Wiki
Grafika Turtle added this page on March 14, 2025
Here is a bonus article that will tell you more about Comments!
In addition to this bonus article, you can find other bonus articles that teach you the topics I covered in Level 1: Syntax, Object‐Oriented Programming, and Troubleshooting & Error Handling.
Leaving notes in your program can be very helpful when you code, and these are called comments. You can use comments to explain what your code does, remind yourself of something, or temporarily turn off a line of code you don’t want to run yet.
Codes can get long and complicated, and comments make it easier to understand what’s going on, especially when you come back to your code later or when someone else is reading it. Comments are like writing sticky notes next to your homework to remind you what you were thinking.
For example:
# This is Paul Python going to school
print("Paul Python goes to IncrediCoders Academy.")
The line that starts with a hashtag #.
Python ignores it when running the program. But we, humans, can read it and understand what the code is about.
Different programming languages use different symbols to write comments. But they all serve the same purpose, adding helpful notes to your code. Here's how you write comments in other languages:
Python
# This is a comment
Java
// This is a comment
C#
// This is a comment
However, when you want to write multiple comments (more than one line), some languages have a special way to do it. This is how it would look like:
Java and C#
/*
This is comment line 1,
This is comment line 2
This is comment line 3
*/
Python
# This is comment 1
# This is comment 2
# This is comment 3
- All programming languages use comments, but they use different symbols to start them.
- Python uses hashtags
#
each line. - Java and C# use
//
for single-line and/* */
for multi-lines.
No matter the language, comments are not read by the computer. They're just there to help understand the code better.
In the Wiki, we tackle the topic of comments on this pages:
- On the Level 2: Help page's Glossary of Terms, we define comments in #6.
Next, if you need help completing the Turtle Map project in the book, you can find help at Level 1: Help.
After you complete Level 1 in the book, you can also take on the two extra challenges to add to your Turtle Map program and learn more! When you're done, you can move on to Level 2, the Class Introductions program!
-
Challenge 1: On this page, I show you how to map a different route to our school, the IncrediCoders Academy. This time, we're going to cross the bridge, over the lake.
-
Challenge 2: For this challenge, I'll show you how to create a loop, so that you can have the turtle go back and forth between my house and the school, five times.
In addition to this Bonus Article and the instructions for our Level 1 challenges, we also have Online Articles, a Learning Quiz, an Unplugged Activity, and a Rewards article:
-
Level 1: Online Articles - I made you a list of different web pages I found, which will help you learn more about Turtle Graphics.
-
Level 1: Learning Quiz - I wrote some questions in case you want to quiz yourself about what you learned. Or you can teach others and quiz them! You'll find the answers to the quiz in the Level 1 Solutions folder.
-
Level 1: Unplugged Activity - I wrote this page with more details than what you saw in the book. In this game, you'll have one person act as the Turtle, and one person is the Programmer!
-
Level 1: Rewards - If you completed the Turtle Map project that we talked about in the car, then I set up this page to be your reward. You can see some illustrations of me and learn more about who I am! You'll also find the Turtle Award digital download, to show off your accomplishment!
After you're completely done with Level 1 (did you do the challenges?), then it's time to move on to Level 2! While you read through Level 2 in your book, you can check out the resources from Mrs. Scratcher, as she teaches you how to build the Class Introductions program:
I hope you had fun learning about Comments! You'd be surprised how often you share code when programming. Comments help developers a lot more than you'd think!
-- Grafika Turtle