Re: [Tutor] Integer division Help requested

2006-10-04 Thread Danny Yoo
>> I feel >> 7/3 should give -2 >> >> since integer divison returns floor > > The floor is the next lowest integer to the float. > floor(-3.1) will be -4 > floor(3.) will be 3 Hi Joseph, If it helps, draw out the floor function out on a piece of graph paper. ^

Re: [Tutor] Integer division Help requested

2006-10-03 Thread Luke Paireepinart
Joseph John wrote: > HI All >I am trying out python > I understoon when > 7/3 gives "2" > But I cannot understand , > when i give 7/-3 gives resuls "-3" > I feel > 7/3 should give -2 > > since integer divison returns floor >Advice re

[Tutor] Integer division Help requested

2006-10-03 Thread Joseph John
HI All    I am trying out python I  understoon when 7/3  gives "2"But I cannot understand ,   when i give 7/-3  gives resuls "-3"I feel 7/3  should give -2 since  integer  divison returns floor    Advice requested