[Solved] What does document your code means? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

[Solved] What does document your code means?

I was surfing q/ans section and I found this https://www.sololearn.com/discuss/137697/?ref=app What will this mean? (point 7 in the question)

9th Feb 2021, 10:12 AM
∆BH∆Y
∆BH∆Y - avatar
1 Answer
+ 6
Document means to comment or to explain a particular class or function. For example in Python, we use DocStrings to describe functions etc. def add(num1, num2): """ This is the document or docstring. This returns the sum of two numbers. """ return num1 + num2 Docstrings or comments are useful for explanation and summary of the purpose of a specific block of codes. This is also important between programmers to understand each other's codes.
9th Feb 2021, 10:15 AM
noteve
noteve - avatar