Re: [Tutor] next class problem

2010-09-18 Thread Roelof Wobben
> Date: Sat, 18 Sep 2010 13:40:55 -0400 > From: bgai...@gmail.com > To: rwob...@hotmail.com > CC: tutor@python.org > Subject: Re: [Tutor] next class problem > > On 9/18/2010 1:20 PM, Roelof Wobben wrote: >> >>

Re: [Tutor] next class problem

2010-09-18 Thread bob gailer
On 9/18/2010 1:20 PM, Roelof Wobben wrote: Hello, I have this exercise : Rewrite the distance function from chapter 5 so that it takes two Points as parameters instead of four numbers. I have this solution : class Point: def __init__(self, x=0, y=0): self.x = x se

[Tutor] next class problem

2010-09-18 Thread Roelof Wobben
Hello, I have this exercise : Rewrite the distance function from chapter 5 so that it takes two Points as parameters instead of four numbers. I have this solution : class Point: def __init__(self, x=0, y=0): self.x = x self.y = y def distance(p1,p2): dx