Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1# Convert marks to a percentage | ATechnical documentation is written for developers and maintainers. End users need the user documentation instead. | |
| 2User guide: Click Save to store your marks | BModule: grades.py | Input: marks list | Output: average | |
| 3Internal documentation describes a function's purpose, inputs and output from inside the code | C"""Return the average of a list of marks.""" | |
| 4Technical documentation is external and lists each module's purpose, inputs and outputs for maintainers | DA user guide is external documentation, not internal. It is a separate document and is not written inside the code. | |
| 5A user guide is internal documentation because it explains how the program works | EInternal documentation: a comment written inside the code to explain what it does | |
| 6Technical documentation is for end users who have never seen the code | FExternal documentation: a separate document that tells users how to operate the program |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
internal vs external documentation — Internal documentation is inside the code (comments, docstrings). External is separate, like a user guide or technical document covering each module's purpose, inputs and outputs.# Internal documentation: stays in the codedef area(w, h):
"""Return the area of a rectangle."""
return w * hdef area(w, h):
"""Return the area of a rectangle."""
print(area.__doc__)def internal(doc):
return doc in ("comment", "docstring")docs = ["user guide", "technical document"]
for d in docs:
print(d)