Re: Dividing integers...Convert to float first?

2007-02-04 Thread rzed
Simon Brunning [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: On 1/5/07, Grant Edwards [EMAIL PROTECTED] wrote: from __future__ import LotteryNumbers File stdin, line 1 SyntaxError: future feature LotteryNumbers is not defined Damn. I guess it's back to work then.

Re: Dividing integers...Convert to float first?

2007-01-06 Thread Thomas Ploch
Beliavsky schrieb: If the C or Fortran committees tried to change the meaning of int/int, they would be shot. Or hanged... If you want to be confident that your code will run, unchanged, 10 years from now on the hardware and OS that will then be common, Python 2.x is not the language to

Dividing integers...Convert to float first?

2007-01-05 Thread redefined . horizons
I'm still pretty new to Python. I'm writing a function that accepts thre integers as arguments. I need to divide the first integer by te second integer, and get a float as a result. I don't want the caller of the function to have to pass floats instead of integers. How do I convert the arguments

Re: Dividing integers...Convert to float first?

2007-01-05 Thread Thomas Ploch
[EMAIL PROTECTED] schrieb: I'm still pretty new to Python. I'm writing a function that accepts thre integers as arguments. I need to divide the first integer by te second integer, and get a float as a result. I don't want the caller of the function to have to pass floats instead of integers.

Re: Dividing integers...Convert to float first?

2007-01-05 Thread Jonathan Smith
Thomas Ploch wrote: [EMAIL PROTECTED] schrieb: I'm still pretty new to Python. I'm writing a function that accepts thre integers as arguments. I need to divide the first integer by te second integer, and get a float as a result. I don't want the caller of the function to have to pass floats

Re: Dividing integers...Convert to float first?

2007-01-05 Thread Grant Edwards
On 2007-01-05, Jonathan Smith [EMAIL PROTECTED] wrote: from __future__ import division 1/2 0.5 $ python Python 2.4.3 (#1, Dec 10 2006, 22:09:09) [GCC 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)] on linux2 Type help, copyright, credits or license for more information.

Re: Dividing integers...Convert to float first?

2007-01-05 Thread Thomas Ploch
Jonathan Smith schrieb: Thomas Ploch wrote: [EMAIL PROTECTED] schrieb: I'm still pretty new to Python. I'm writing a function that accepts thre integers as arguments. I need to divide the first integer by te second integer, and get a float as a result. I don't want the caller of the function

Re: Dividing integers...Convert to float first?

2007-01-05 Thread Thomas Ploch
Grant Edwards schrieb: On 2007-01-05, Jonathan Smith [EMAIL PROTECTED] wrote: from __future__ import division 1/2 0.5 $ python Python 2.4.3 (#1, Dec 10 2006, 22:09:09) [GCC 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)] on linux2 Type help, copyright, credits or

Re: Dividing integers...Convert to float first?

2007-01-05 Thread Simon Brunning
On 1/5/07, Grant Edwards [EMAIL PROTECTED] wrote: from __future__ import LotteryNumbers File stdin, line 1 SyntaxError: future feature LotteryNumbers is not defined Damn. I guess it's back to work then. Remember the PEP 8 module name standards. from __future__ import

Re: Dividing integers...Convert to float first?

2007-01-05 Thread Paul McGuire
Simon Brunning [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On 1/5/07, Grant Edwards [EMAIL PROTECTED] wrote: from __future__ import LotteryNumbers File stdin, line 1 SyntaxError: future feature LotteryNumbers is not defined Damn. I guess it's back to work then.

Re: Dividing integers...Convert to float first?

2007-01-05 Thread Beliavsky
Thomas Ploch wrote: Jonathan Smith schrieb: Thomas Ploch wrote: [EMAIL PROTECTED] schrieb: I'm still pretty new to Python. I'm writing a function that accepts thre integers as arguments. I need to divide the first integer by te second integer, and get a float as a result. I don't want

Re: Dividing integers...Convert to float first?

2007-01-05 Thread Dan Bishop
On Jan 5, 11:47 am, Thomas Ploch [EMAIL PROTECTED] wrote: Jonathan Smith schrieb: Thomas Ploch wrote: [EMAIL PROTECTED] schrieb: I'm still pretty new to Python. I'm writing a function that accepts thre integers as arguments. I need to divide the first integer by te second integer, and