Comments
Comments are lines of text in your code that Python ignores because they are for people, not machines. In most cases, comments are created to explain a piece of code so that another programmer who will watch the code can understand it.
123# This is a comment # Python ignores it print("Hello, kittens!")
Comments begin with #, and after this you write the text you need. Let's take another example:
1234567# Creating variables number_1 = 65 number_2 = 30 # Addition of two numbers sum_=number_1 + number_2 # Displaying the result on the screen print(sum_)
In the code above, Python displays the message and ignores the comment.
Tack för dina kommentarer!
single
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal
Awesome!
Completion rate improved to 5.88
Comments
Svep för att visa menyn
Comments are lines of text in your code that Python ignores because they are for people, not machines. In most cases, comments are created to explain a piece of code so that another programmer who will watch the code can understand it.
123# This is a comment # Python ignores it print("Hello, kittens!")
Comments begin with #, and after this you write the text you need. Let's take another example:
1234567# Creating variables number_1 = 65 number_2 = 30 # Addition of two numbers sum_=number_1 + number_2 # Displaying the result on the screen print(sum_)
In the code above, Python displays the message and ignores the comment.
Tack för dina kommentarer!
Awesome!
Completion rate improved to 5.88single