Created
February 19, 2015 21:28
-
-
Save ejmurray/e6babd6ad48bebcfddfa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# encoding: utf-8 | |
"""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)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment