[Tutor] Not to bad,not to good!how to tell apart!!

Paul Hickey pauljhickey@eircom.net
Sun Jul 27 12:09:02 2003


This is a multi-part message in MIME format.

------=_NextPart_000_0007_01C35461.B0198810
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

newbie help needed!!

This is what i've got i could do with some help, thanks!

s =3D raw_input ("How are you?")
if s.find('fine')>=3D0:
    print "Im glad that your good!'
elif s.find('OK')>=3D0:
    print "Happy to hear your OK!"
elif s.find('bad')>=3D0:
    print "Hey look on the bright side, coud be worse!'
elif s.find('not too bad')>=3D0:
    print " im glad to hear your good!"

The last line don't work!!! Help.

Also can i 'bunch' several words  together like,

elif s.find('fine' or 'good' or 'OK' )>=3D0:
    print "Glad that thinigs are going well!"

This line dont work either!!!
I've tried to play with this but ot no avail

There's also the thing about upper and lower case is that a major thing =
or will i forget about that for the time being.

Or ?? Am i going about this the right way, if i can 'bunch' several key =
words in the same statement the i could save a lot of typing, however is =
there a better method that a newbie might have a hope of understanding.
Help with ANY part of this would be great.
Thanks for your time, hope im not asking for too much!
Paul
------=_NextPart_000_0007_01C35461.B0198810
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1170" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>newbie help needed!!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>This is what i've got i could do with =
some help,=20
thanks!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>s =3D raw_input ("How are =
you?")</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>if s.find('fine')&gt;=3D0:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; print "Im glad that =
your=20
good!'</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>elif s.find('OK')&gt;=3D0:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; print "Happy to hear =
your=20
OK!"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>elif =
s.find('bad')&gt;=3D0:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; print "Hey look on =
the bright=20
side, coud be worse!'</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>elif s.find('not&nbsp;too =
bad')&gt;=3D0:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; print " im glad to =
hear your=20
good!"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The last line don't work!!! =
Help.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Also can i 'bunch' several words&nbsp; =
together=20
like,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>elif s.find('fine' or 'good' or 'OK'=20
)&gt;=3D0:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; print "Glad that =
thinigs are=20
going well!"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>This line dont work =
either!!!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I've tried to play with this but ot no=20
avail</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>There's also the thing about upper and =
lower case=20
is that a major thing or will i forget about that for the time=20
being.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Or ?? Am i going about this the right =
way, if i can=20
'bunch' several key words in the same statement the i could save a lot =
of=20
typing, however is there a better method that a newbie might have a hope =
of=20
understanding.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Help with&nbsp;ANY part of this would =
be=20
great.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for your time, hope im not =
asking for too=20
much!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Paul</FONT></DIV></BODY></HTML>

------=_NextPart_000_0007_01C35461.B0198810--