0

What is the work of comment?

3rd Jul 2020, 4:53 AM
Jay Das
3 Risposte
+ 4
Comments help the reader to understand the code and increase readability in code. So, that others can understand what the developer has written in code See this python example:- def printhw(): # This creates a new function called printhw. print("Hello world"*5) # This will print Hello world 5 times when it will be called. This will become easier for the reader to understand the code and the comments are ignored while running the program.
3rd Jul 2020, 5:00 AM
Rishabh Dwivedi
Rishabh Dwivedi - avatar
0
Basically, comments are used in big programs where sometimes it happens that the user get confused which funtion does which thing so to clear that confusion it is used....! I hope u got me...!!☺☺
3rd Jul 2020, 9:13 AM
Arya Deep Chowdhury
Arya Deep Chowdhury - avatar