Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Comments | The basics
Learn Python from Scratch
course content

Зміст курсу

Learn Python from Scratch

Learn Python from Scratch

1. The basics
2. Arithmetic operations
3. Common data types
4. Conditional statements
5. Other data types
6. Loops
7. Functions

Comments

Before moving further, quick thing to learn: comments. Comment is a part of code which is not executed (ignored by the program). Comments are used as notes that developers leave for themselves or other users.

In Python there are single-line comments and multi-line comments (used less often).

Single-line comment start with symbol #. If placed at the beggining of the line entire line is ignored.

12
# this is a comment that I left as a note for myself print("Hello, World!")
copy

Comments can be placed at any position of any line. Anything before # sign will be executed, anything after # sign will be ignored.

1
print("Hello, world!") # Comments can be very helpful
copy

You can switch certain lines of code off by just placing a # sign (turning it into a comment).

12
# print("Hello, Mary!") print("Hello, Jane!")
copy

Завдання

Switch off second ling of code by turning it into a comment.

Завдання

Switch off second ling of code by turning it into a comment.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 1. Розділ 4
toggle bottom row

Comments

Before moving further, quick thing to learn: comments. Comment is a part of code which is not executed (ignored by the program). Comments are used as notes that developers leave for themselves or other users.

In Python there are single-line comments and multi-line comments (used less often).

Single-line comment start with symbol #. If placed at the beggining of the line entire line is ignored.

12
# this is a comment that I left as a note for myself print("Hello, World!")
copy

Comments can be placed at any position of any line. Anything before # sign will be executed, anything after # sign will be ignored.

1
print("Hello, world!") # Comments can be very helpful
copy

You can switch certain lines of code off by just placing a # sign (turning it into a comment).

12
# print("Hello, Mary!") print("Hello, Jane!")
copy

Завдання

Switch off second ling of code by turning it into a comment.

Завдання

Switch off second ling of code by turning it into a comment.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 1. Розділ 4
toggle bottom row

Comments

Before moving further, quick thing to learn: comments. Comment is a part of code which is not executed (ignored by the program). Comments are used as notes that developers leave for themselves or other users.

In Python there are single-line comments and multi-line comments (used less often).

Single-line comment start with symbol #. If placed at the beggining of the line entire line is ignored.

12
# this is a comment that I left as a note for myself print("Hello, World!")
copy

Comments can be placed at any position of any line. Anything before # sign will be executed, anything after # sign will be ignored.

1
print("Hello, world!") # Comments can be very helpful
copy

You can switch certain lines of code off by just placing a # sign (turning it into a comment).

12
# print("Hello, Mary!") print("Hello, Jane!")
copy

Завдання

Switch off second ling of code by turning it into a comment.

Завдання

Switch off second ling of code by turning it into a comment.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Before moving further, quick thing to learn: comments. Comment is a part of code which is not executed (ignored by the program). Comments are used as notes that developers leave for themselves or other users.

In Python there are single-line comments and multi-line comments (used less often).

Single-line comment start with symbol #. If placed at the beggining of the line entire line is ignored.

12
# this is a comment that I left as a note for myself print("Hello, World!")
copy

Comments can be placed at any position of any line. Anything before # sign will be executed, anything after # sign will be ignored.

1
print("Hello, world!") # Comments can be very helpful
copy

You can switch certain lines of code off by just placing a # sign (turning it into a comment).

12
# print("Hello, Mary!") print("Hello, Jane!")
copy

Завдання

Switch off second ling of code by turning it into a comment.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 1. Розділ 4
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt