Re: [Tutor] sqrt?

2010-04-24 Thread Steven D'Aprano
On Sun, 25 Apr 2010 01:00:50 pm Kirk Z Bailey wrote: > ok gang, My desktop runs 2.5, and for my college algebra I needed to > do som quadratic equation work. This involves squareroots. So I fired > uop the interactive idle and imported math. I then tried to play with > sqrt. > > Nothing. > > Import

Re: [Tutor] sqrt?

2010-04-24 Thread Walter Wefft
Kirk Z Bailey wrote: ok gang, My desktop runs 2.5, and for my college algebra I needed to do som quadratic equation work. This involves squareroots. So I fired uop the interactive idle and imported math. I then tried to play with sqrt. Nothing. Importing math does not import a sqrt function.

[Tutor] sqrt?

2010-04-24 Thread Kirk Z Bailey
ok gang, My desktop runs 2.5, and for my college algebra I needed to do som quadratic equation work. This involves squareroots. So I fired uop the interactive idle and imported math. I then tried to play with sqrt. Nothing. Importing math does not import a sqrt function. Now riddle me this: i

Re: [Tutor] Binary search question

2010-04-24 Thread Lie Ryan
On 04/24/10 23:39, Robert Berman wrote: >> -Original Message- >> From: tutor-bounces+bermanrl=cfl.rr@python.org [mailto:tutor- >> bounces+bermanrl=cfl.rr@python.org] On Behalf Of Alan Gauld >> Sent: Friday, April 23, 2010 7:41 PM >> To: tutor@python.org >> Subject: Re: [Tutor] Binar

Re: [Tutor] Binary search question

2010-04-24 Thread Hugo Arts
On Sat, Apr 24, 2010 at 10:48 AM, Alan Gauld wrote: > > "Steven D'Aprano" wrote > >>> Interestingly on my PC with Python 3.1: >>> >>> data = list(range(1000)) >>> >>> 999 in data >>> >>> takes an apparently constant, sub second time. >> >> With respect Alan, timing operations by eye is pr

Re: [Tutor] Binary search question

2010-04-24 Thread Robert Berman
> -Original Message- > From: tutor-bounces+bermanrl=cfl.rr@python.org [mailto:tutor- > bounces+bermanrl=cfl.rr@python.org] On Behalf Of Alan Gauld > Sent: Friday, April 23, 2010 7:41 PM > To: tutor@python.org > Subject: Re: [Tutor] Binary search question > > "Emile van Sebille" wr

Re: [Tutor] Hi everybody stuck on some error need help please thank you!!

2010-04-24 Thread Dave Angel
(Don't top-post. Either put your remarks immediately after the part they reference, or at the end of the message. Otherwise, everything's thoroughly out of order.) Marco Rompré wrote: I tried to enter model = Modele (nom_fichier) but it still does not work. You didn't define the global no

Re: [Tutor] Class Inheritance, Beat it into the Ground

2010-04-24 Thread Alan Gauld
"Steven D'Aprano" wrote Yes, Tkinter could have had a ScrolledCanvas. It could have had lots of things, you have to draw the line somewhere otherwise you end up with one giant module that does *everything*: And for completeness there are a number of add-on modules in the standard library that

Re: [Tutor] Class Inheritance, Beat it into the Ground

2010-04-24 Thread Alan Gauld
"David Hutto" wrote In previous post I asked about turtle module importing from tkinter. But what I don't understand is why does Tkinter default it's casnvas to ScrolledCanvas in turtle.py, Tkinter doesn't. The author of the turtle module - which is not part of Tkinter but simply uses it -

Re: [Tutor] Binary search question

2010-04-24 Thread Alan Gauld
"Steven D'Aprano" wrote Interestingly on my PC with Python 3.1: >>> data = list(range(1000)) >>> 999 in data takes an apparently constant, sub second time. With respect Alan, timing operations by eye is pretty lame, what did you do, count your heartbeats? :) Sure, but I was surpri