Update code sample
This commit is contained in:
parent
2db06baeb3
commit
e3484b9791
2 changed files with 372 additions and 722 deletions
8
book.org
8
book.org
|
@ -2941,10 +2941,10 @@ Previous iterations considered all the nodes that contained the relevant line (e
|
|||
#+CAPTION: Sample code that simply reads a number from standard input and prints its digits.
|
||||
#+NAME: lst:feedbacksubtreesample
|
||||
#+BEGIN_SRC python
|
||||
number = input()
|
||||
print(f'{number} has the following digits:')
|
||||
for digit in number:
|
||||
print(digit)
|
||||
def jump(alpha, n):
|
||||
alpha_number = ord(alpha)
|
||||
adjusted = alpha_number + n
|
||||
return chr(adjusted)
|
||||
#+END_SRC
|
||||
|
||||
#+CAPTION: AST subtree corresponding to line 3 in Listing\nbsp{}[[lst:feedbacksubtreesample]].
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue