Pinecones multiply like rabbits around here...

Mark Nenadov mnenadov at stclairc.on.ca
Tue Jul 24 14:27:44 CEST 2001


In article <mailman.995975742.21691.python-list at python.org>, "Skip
Montanaro" <skip at pobox.com> wrote:


> I was on a walk with my wife and dog yesterday.  Out of the blue I asked
> her "what's the result of five divided by two?"  After a little
> back-and-forth where she tried to figure out how I was trying to trick
> her and make her look foolish she answered, "two-and-a-half".  I then
> posed, "Suppose you have five pinecones and you want to clump them into
> groups of two.  What would you do?".  Her answer was, "Put two in the
> first group, two in the second group, and break the last pinecone in two
> so the third group would have two as well."
> Can we represent that in Python's arithmetic operations somehow? :-)

Hmm...

answer = 5 / 2
print answer
>> 2

sys.mathtype = "break those dark pinecones"
answer = 5/2
print answer
>> 2.5

wow! :)

-- 
~Mark Nenadov (author/editor for http://www.coffeecode.com)



More information about the Python-list mailing list