division bug?

Skip Montanaro skip at pobox.com
Wed Jun 9 17:16:59 CEST 2004


    Milan> a program:
    Milan> a=10
    Milan> b=5
    Milan> print a/b

    Milan> and its result: 0. If you run the program, you see always a sero
    Milan> (0), but 10/5 is 2. Who can help me?

Works for me:

    % python
    Python 2.4a0 (#25, May 22 2004, 15:16:21) 
    [GCC 3.3 20030304 (Apple Computer, Inc. build 1493)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> a=10
    >>> b=5
    >>> print a/b
    2

I think you'll need to give more details (platform, version, actual
interpreter output, etc) to get any more useful help.

Skip




More information about the Python-list mailing list