Michael L Torrie wrote:
> Which is exactly what he said.
Haha. Nevermind. You're right. A subtle distinction, isn't it.
>He also said that what the poster
> probably wanted was
>
> if cal <= 0 or fat <=0
>
>
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 10 Oct 2007 20:42:26 -0600, Michael L Torrie wrote:
> [EMAIL PROTECTED] wrote:
>
>
>> that's the most incorrect thing i've heard all day!
>>
>> if cal or fat <= 0 is parsed as if (cal) or (fat <= 0)
>
> Which is exactly what he said.
Heh, that was my first thought too, for about 3.2 m
[EMAIL PROTECTED] wrote:
>
> that's the most incorrect thing i've heard all day!
>
> if cal or fat <= 0 is parsed as if (cal) or (fat <= 0)
Which is exactly what he said. He also said that what the poster
probably wanted was
if cal <= 0 or fat <=0
>
--
http://mail.python.org/mailman/listi
On Oct 10, 11:03 pm, Larry Bates <[EMAIL PROTECTED]> wrote:
[...]
>
> Boolean problem:
>
> if cal or fat <= 0
>
> That may be the way you say it or "think" it but it won't work.
>
> 'cal or fat' is evaluated first. Since they both have values this ALWAYS
> evaluates to 1 which is NEVER less than o
On Oct 10, 5:03 pm, Larry Bates <[EMAIL PROTECTED]> wrote:
> Shawn Minisall wrote:
> > I just learned about if, then elif statements and wrote this program.
> > The problem is, it's displaying all of the possibilities even after you
> > enter a 0, or if the fat gram
Shawn Minisall wrote:
> I just learned about if, then elif statements and wrote this program.
> The problem is, it's displaying all of the possibilities even after you
> enter a 0, or if the fat grams are more then the total number of
> calories , that is supposed to stop th
Shawn Minisall wrote:
> I just learned about if, then elif statements and wrote this program.
> The problem is, it's displaying all of the possibilities even after you
> enter a 0, or if the fat grams are more then the total number of
> calories , that is supposed to stop th
I just learned about if, then elif statements and wrote this program.
The problem is, it's displaying all of the possibilities even after you
enter a 0, or if the fat grams are more then the total number of
calories , that is supposed to stop the program instead of continuing on
wit