Skip to content

Instantly share code, notes, and snippets.

@markchadwick
Created July 1, 2011 01:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markchadwick/1057721 to your computer and use it in GitHub Desktop.
Save markchadwick/1057721 to your computer and use it in GitHub Desktop.
def secret_formula(started):
jelly_beans = started * 500
my_jars = jelly_beans / 1000
my_crates = my_jars / 100
return jelly_beans, my_jars, my_crates
start_point = 10000
beans, jars, crates = secret_formula(start_point)
print "With a starting point of: %d" % start_point
print "We'd have %d beans, %d jars, and %d crates." % (beans, jars, crates)
start_point = start_point / 10
print "We can also do that this way:"
print "We'd have %d beans, %d jars, and %d crates." % secret_formula(start_point)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment