forked from AllenDowney/ThinkPython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstack_diagram.py
More file actions
33 lines (24 loc) · 511 Bytes
/
Copy pathstack_diagram.py
File metadata and controls
33 lines (24 loc) · 511 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""This module contains code from
Think Python by Allen B. Downey
http://thinkpython.com
Copyright 2012 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
from swampy.Lumpy import Lumpy
def b(z):
prod = a(z, z)
print z, prod
return prod
def a(x, y):
x = x + 1
lumpy.object_diagram()
return x * y
def c(x, y, z):
total = x + y + z
square = b(total)**2
return square
lumpy = Lumpy()
lumpy.make_reference()
x = 1
y = x + 1
print c(x, y+3, x+y)