Re: strange behavior of math.sqrt() in new 3.0 version

2009-01-03 Thread Eric Kemp
Tim Roberts wrote: Scott David Daniels wrote: I avoid using single-letter variables except where I know the types from the name (so I use i, j, k, l, m, n as integers, s as string, and w, x, y, and z I am a little looser with (but usually float or complex). It's amazing to me that Fortran con

Re: strange behavior of math.sqrt() in new 3.0 version

2008-12-28 Thread Steve Holden
Tim Roberts wrote: > Scott David Daniels wrote: >> I avoid using single-letter variables except where I know the types >>from the name (so I use i, j, k, l, m, n as integers, s as string, >> and w, x, y, and z I am a little looser with (but usually float or >> complex). > > It's amazing to me tha

Re: strange behavior of math.sqrt() in new 3.0 version

2008-12-27 Thread Tim Roberts
Scott David Daniels wrote: > >I avoid using single-letter variables except where I know the types >from the name (so I use i, j, k, l, m, n as integers, s as string, >and w, x, y, and z I am a little looser with (but usually float or >complex). It's amazing to me that Fortran continues to live on

Re: strange behavior of math.sqrt() in new 3.0 version

2008-12-26 Thread John Machin
On Dec 27, 8:52 am, David Lemper wrote: > I'm a newbee trying 3.0   Please help with  math.sqrt() math.sqrt() is not the problem. > At the command line this function works correctly >       >>> import math >               n = input("enter a number > ") >               s = math.sqrt(n) >      An e

Re: strange behavior of math.sqrt() in new 3.0 version

2008-12-26 Thread Gabriel Genellina
En Fri, 26 Dec 2008 19:52:24 -0200, escribió: I'm a newbee trying 3.0 Please help with math.sqrt() At the command line this function works correctly >>> import math n = input("enter a number > ") s = math.sqrt(n) An entry of 9 or 9.0 will yield 3.0 Y

Re: strange behavior of math.sqrt() in new 3.0 version

2008-12-26 Thread Chris Rebert
On Fri, Dec 26, 2008 at 1:52 PM, wrote: > I'm a newbee trying 3.0 Please help with math.sqrt() > > At the command line this function works correctly > >>> import math > n = input("enter a number > ") raw_input() was renamed input() in Python 3.0, and it returns a *string*, n

Re: strange behavior of math.sqrt() in new 3.0 version

2008-12-26 Thread Scott David Daniels
David Lemper wrote: I'm a newbee trying 3.0 Please help with math.sqrt() At the command line this function works correctly >>> import math n = input("enter a number > ") s = math.sqrt(n) An entry of 9 or 9.0 will yield 3.0 Yet the same code in a sc

strange behavior of math.sqrt() in new 3.0 version

2008-12-26 Thread David
I'm a newbee trying 3.0 Please help with math.sqrt() At the command line this function works correctly >>> import math n = input("enter a number > ") s = math.sqrt(n) An entry of 9 or 9.0 will yield 3.0 Yet the same code in a script gives an error mess