+ 2
What is the use of comments anyhow it doesn't have any effect on output
8 odpowiedzi
+ 5
Comments make it much easier when you have to take over someone else’s code (or they yours) so you know why it was written in such a way or any dependancies that need to be taken into consideration. I also use comments as notes-to-self for future reference in case I want to grab a chunk of code for another project. I also use comments as citations/shout-outs (like if I had help with a section of code from someone).
+ 3
Comments will make you remember what you did last summer.
+ 3
No..comments doesn't create any effect on output
Comments make it much easier when you have to take over someone else’s code (or they yours)
+ 1
comments just describe and explain the code so that everyone can understand your program
0
It is made for readability reasons.
Compare and contrast :
#first we have a number
a=1
#then we multiply by 2
a*=2
#now print the result
print(a)
Against:
a=1
a*=2
print(a)
This is a small but easy to understand program but think when you go large.
0
Sorry but I did not understand bcz I am new to programming languages I just started two days before
0
Tibor Santa what do u mean by last summer
0
Sorry, it was a reference to an old-time horror movie :p
https://m.imdb.com/title/tt0119345/