1 added
0 removed
Original
2026-01-01
Modified
2026-02-21
1
<p>"Hello, World!" is the traditional way to begin learning a new programming language. It is a simple program that displays a greeting on the screen and introduces the new language by showing its syntax and program structure.</p>
1
<p>"Hello, World!" is the traditional way to begin learning a new programming language. It is a simple program that displays a greeting on the screen and introduces the new language by showing its syntax and program structure.</p>
2
<p>We're not breaking this tradition since it is over forty years old. In the first lesson, we'll write a program called Hello, World!. To do this, you need to give the computer a special command. That is print() in Python:</p>
2
<p>We're not breaking this tradition since it is over forty years old. In the first lesson, we'll write a program called Hello, World!. To do this, you need to give the computer a special command. That is print() in Python:</p>
3
<p>We used a comment to explain more about what value is displayed.</p>
3
<p>We used a comment to explain more about what value is displayed.</p>
4
+
<h2>How comments work</h2>
4
<p>Almost all programming languages allow you to leave comments on your code. The interpreter ignores them. They're only for people; they let the programmer make notes for themselves and other programmers.</p>
5
<p>Almost all programming languages allow you to leave comments on your code. The interpreter ignores them. They're only for people; they let the programmer make notes for themselves and other programmers.</p>
5
<p>They allow you to add explanations of how the code works, what errors need to be corrected, or what you need to remember to add later:</p>
6
<p>They allow you to add explanations of how the code works, what errors need to be corrected, or what you need to remember to add later:</p>
6
<p>In Python, comments begin with the # sign and can appear anywhere in the program. They can take up an entire line. If one line isn't enough, you can create several comments:</p>
7
<p>In Python, comments begin with the # sign and can appear anywhere in the program. They can take up an entire line. If one line isn't enough, you can create several comments:</p>
7
<p>The comment can be on the line after the code:</p>
8
<p>The comment can be on the line after the code:</p>
8
9