Style
Style guide
Code
-
Use fenced code blocks to represent source code.
$ pwd /Users/chris
def fibb(): "An iterator over the fibonacci sequence" a, b = 1, 0 while True: yield a a, b = a + b, a
-
For interactive shells such as the command prompt and Python's REPL, show output as it will appear to users.
>>> 1+2 3
-
Use line numbers when the text will refer to specific elements of the code.
-
Use
$
to represent the command prompt. When filesystem locations are important, use~/Desktop/cs9/unit_00$
.