[Tutor] How to "grab" a Word Update!Im gettin there!!

Paul Hickey pauljhickey@eircom.net
Tue Jul 15 16:58:02 2003


This is a multi-part message in MIME format.

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

Hi, with help from you , I've got this far,

        s =3D raw_input("What do you like to do")
        if s.find('music')
            print "So you like music then!"
        elif s.find('golf')
            print "You like golf, boring!!"
        elif s.find('walking')
            print " Us computers can't walk!"

This works fine when only one argument is present, naturally im trying =
to push it!!!!!
Problem is it returns the first print statement whatever you enter,I've =
played with this with no joy as yet
Thanks for your help so far.
Sorry to be a pest....
Paul
------=_NextPart_000_0051_01C34B1C.02182490
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>Hi, with help from you , I've got this=20
far,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; s =
=3D=20
raw_input("What do you like to do")</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
if=20
s.find('music')</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; print "So you like music then!"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
elif=20
s.find('golf')</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; print "You like golf, boring!!"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
elif=20
s.find('walking')</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; print " Us computers can't walk!"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>This works fine when only one argument =
is present,=20
naturally im trying to push it!!!!!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Problem is it returns the first print =
statement=20
whatever you enter,I've played with this with no joy as yet</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for your help so =
far.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Sorry to be a pest....</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Paul</FONT></DIV></BODY></HTML>

------=_NextPart_000_0051_01C34B1C.02182490--