Contenido del Curso
Learn Python from Scratch
Learn Python from Scratch
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.
# this is a comment that I left as a note for myself print("Hello, World!")
Comments can be placed at any position of any line. Anything before # sign will be executed, anything after # sign will be ignored.
print("Hello, world!") # Comments can be very helpful
You can switch certain lines of code off by just placing a # sign (turning it into a comment).
# print("Hello, Mary!") print("Hello, Jane!")
Tarea
Switch off second ling of code by turning it into a comment.
¡Gracias por tus comentarios!
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.
# this is a comment that I left as a note for myself print("Hello, World!")
Comments can be placed at any position of any line. Anything before # sign will be executed, anything after # sign will be ignored.
print("Hello, world!") # Comments can be very helpful
You can switch certain lines of code off by just placing a # sign (turning it into a comment).
# print("Hello, Mary!") print("Hello, Jane!")
Tarea
Switch off second ling of code by turning it into a comment.
¡Gracias por tus comentarios!
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.
# this is a comment that I left as a note for myself print("Hello, World!")
Comments can be placed at any position of any line. Anything before # sign will be executed, anything after # sign will be ignored.
print("Hello, world!") # Comments can be very helpful
You can switch certain lines of code off by just placing a # sign (turning it into a comment).
# print("Hello, Mary!") print("Hello, Jane!")
Tarea
Switch off second ling of code by turning it into a comment.
¡Gracias por tus comentarios!
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.
# this is a comment that I left as a note for myself print("Hello, World!")
Comments can be placed at any position of any line. Anything before # sign will be executed, anything after # sign will be ignored.
print("Hello, world!") # Comments can be very helpful
You can switch certain lines of code off by just placing a # sign (turning it into a comment).
# print("Hello, Mary!") print("Hello, Jane!")
Tarea
Switch off second ling of code by turning it into a comment.