[Edu-sig] A Quick Puzzle

2006-03-07 Thread kirby urner
Here's a quick puzzle, that'd make a good source of Python programs, or programs in other languages: Assume dogs live at 7 times the rate of a man, such that when a man ages but one year, the dog ages by 7. Now assume a dog is born later than you, and you get her as a puppy (feel free to mess

Re: [Edu-sig] A Quick Puzzle

2006-03-07 Thread Michael Tobis
# I love Python! import datetime# batteries included! me = datetime.date(1954,9,1) dog = datetime.date(2006,3,7) print me + (7 * (dog - me)/6) # mt On 3/7/06, kirby urner [EMAIL PROTECTED] wrote: Here's a quick puzzle, that'd make a good source of Python programs, or programs in other

Re: [Edu-sig] A Quick Puzzle

2006-03-07 Thread Tim Peters
[kirby urner] Here's a quick puzzle, that'd make a good source of Python programs, or programs in other languages: Assume dogs live at 7 times the rate of a man, such that when a man ages but one year, the dog ages by 7 That vaguely reminds me of a puzzle I enjoyed much as a kid: on

Re: [Edu-sig] A Quick Puzzle

2006-03-07 Thread kirby urner
Yeah, that looks like the Jon Bunce formula. Packing lap top. Hoping to claim $5 (I owe you a beer). Kirby On 3/7/06, Michael Tobis [EMAIL PROTECTED] wrote: # I love Python! import datetime# batteries included! me = datetime.date(1954,9,1) dog = datetime.date(2006,3,7) print me +

Re: [Edu-sig] A Quick Puzzle

2006-03-07 Thread kirby urner
Michael -- Here's a cut and paste from Pauling House (boyhood home of Portland *other* famous Linus). IDLE 1.1.1 import datetime me = datetime.date(1952,12,17) dog = datetime.date(1999, 1,2) print me + (7 * (dog - me)/6) 2006-09-04 This is the real answer the guy wanted. Mission

Re: [Edu-sig] A Quick Puzzle

2006-03-07 Thread Scott David Daniels
Tim Peters wrote: That vaguely reminds me of a puzzle I enjoyed much as a kid: on what day will you be half as old as your father? a third as old? a quarter as old? three-quarters as old? nine-tenths as old? ... It's a good way of showing that x/(x+d), for fixed positive d, approaches 1

Re: [Edu-sig] A Quick Puzzle

2006-03-07 Thread kirby urner
This is the real answer the guy wanted. Mission accomplished. No offer of $5 though. Kirby Still here at Pauling House (near 39th Hawthorne, SE Portland). The dog owner remembered about the $5. I said I'm narrating the story in quasi real time, that his giving me a fiver would enter the