Re: [Edu-sig] A Quick Puzzle
On Tue, 2006-03-07 at 21:15 -0800, Scott David Daniels wrote: > I called my father up within an hour of when he was twice as old as I. > I was expecting a real "you are such a dweeb" conversation, but he wound > up talking a lot about what it felt like when I was born. It was such a > wonderful surprise; a great conversation for both of us. If my father, my son and I survive 4 more years, I will call my son someday to tell him that in that exact day: I've become 3 times older than him, and his grandfather (85) has become 5 times older than him! I will also phone my father in that exact date, to remind him of those facts, and neither my father nor my son will be surprised that I call them to talk about ages; both will think I called them to wish them a happy birthday. They will also take the opportunity to wish me a happy birthday too :) By the way, my father didn't do any special planning about my mother's pregnancy with me, and I didn't do any planning about my wife's pregnancy either. It was all pure coincidence. Jaime ___ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
Re: [Edu-sig] A Quick Puzzle
> 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 annals of... well, not to over do it or anything. He paid me. Machael, I owe you that beer (Jon too, come to think of it). Kirby ___ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
Re: [Edu-sig] A Quick Puzzle
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 > from the left as x goes to infinity. Unfortunately, my own father > died before I became twice as old as him ;-) I called my father up within an hour of when he was twice as old as I. I was expecting a real "you are such a dweeb" conversation, but he wound up talking a lot about what it felt like when I was born. It was such a wonderful surprise; a great conversation for both of us. -- Scott David Daniels [EMAIL PROTECTED] ___ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
Re: [Edu-sig] A Quick Puzzle
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 accomplished. No offer of $5 though. 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 + (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 languages: > ___ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
Re: [Edu-sig] A Quick Puzzle
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 + (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 languages: > ___ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
Re: [Edu-sig] A Quick Puzzle
[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 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 from the left as x goes to infinity. Unfortunately, my own father died before I became twice as old as him ;-) ___ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
Re: [Edu-sig] A Quick Puzzle
# 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 languages: ___ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
[Edu-sig] A Quick Puzzle
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 with these gender assumptions). At some point, as long as you keep living (assume that you do), the dog will catch up to you, and overtake you in age (the dog too, keeps living, at least long enough for the two life-lines to intersect). So challenge: write a program where you input the two birth dates, yours and your dog's. What the script returns is the very day of the very month of the very year, on which you and your dog might reasonably celebrate a "same age" intersection, a "birthday in common" if you will (we could get more precise, but only if the birth times are known with equal precision). I'm actually working on this project now, in anticipation of earning five dollars. Jon Bunce, another Wanderer, has already worked out a formula and shared it around. But I'm thinking just for fun, to do something totally brute force using Julian dates. Anyway, it'll be fun to compare different solutions, in terms of accuracy, quirkiness, readability, speed -- lots of interesting criteria. Just another puzzle for the literature, not my invention, just something I've thought about. A guy with a real dog and a real interest in the answer, came to Don Wardwell with it, looking for the services of a real think tank. Over on the Math Forum, I couched it as a puzzle for cgi scripters, i.e. make up a web site calculator around this, using JavaScript or whatever (a new way to do story problems). Of course similar games may be played with other animals with different "life rates." Don't get too hung up on what actual ratios to use, unless that's a stated goal of the lesson. In most cases, just take these as puzzles, like Sudoku, not as literally true biology lessons. Kirby ___ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig