Skip to content

Instantly share code, notes, and snippets.

@ejmurray
Created February 19, 2015 21:28
Show Gist options
  • Save ejmurray/e6babd6ad48bebcfddfa to your computer and use it in GitHub Desktop.
Save ejmurray/e6babd6ad48bebcfddfa to your computer and use it in GitHub Desktop.
#!/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