mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-09-24 23:01:18 +08:00
fix(curriculum): correct docstring example in Python V9 Step 24 (#65098)
Co-authored-by: Jeevankumar-S <jeevenkumar2003@email.com>
This commit is contained in:
co-authored by
Jeevankumar-S
parent
7c3d6339bb
commit
6fd632d228
+2
-2
@@ -10,8 +10,8 @@ dashedName: step-24
|
||||
A docstring is a string placed as the first statement in a class or function, and it's used to provide documentation for that class or function. Docstrings are typically enclosed by triple double quotes:
|
||||
|
||||
```py
|
||||
def add(x):
|
||||
"""A function that returns the square of a number."""
|
||||
def add(x, y):
|
||||
"""A function that returns the sum of two numbers."""
|
||||
return x + y
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user