[Tutor] Using and
Wayne Werner
waynejwerner at gmail.com
Sun Feb 21 14:53:43 CET 2010
On Sun, Feb 21, 2010 at 7:44 AM, jim serson <fubarninja at hotmail.com> wrote:
> Can anyone tell me if I can have my program check to see if something is
> true the add to count
>
> For example something like
>
> if c_1 and c_2 and c_3 true:
> count + 1
>
> or if I can use it after splitting an input the problem is the input is
> variable so I don't know if I can do such a thing without knowing the input
> ahead of time. if anyone can tell me if this is possible or if I should be
> doing something else that would be grate thanks.
>
Your explanation is a little ambiguous. Try writing out some pseudo-code of
what you want to do, i.e.
get input, assign to c1
assign random number to c2
get another input, assign to c3
check if c1, c2, and c3 are all non-empty strings
if yes, do something
otherwise do something else
If you can do that, someone can probably help you.
Otherwise we're just shooting in the dark, and no one likes that.
HTH,
Wayne
--
To be considered stupid and to be told so is more painful than being called
gluttonous, mendacious, violent, lascivious, lazy, cowardly: every weakness,
every vice, has found its defenders, its rhetoric, its ennoblement and
exaltation, but stupidity hasn’t. - Primo Levi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100221/a4c9d299/attachment.html>
More information about the Tutor
mailing list