Artificial intelligence program..not really just simple

This is the place for queries that don't fit in any of the other categories.

Re: Artificial intelligence program..not really just simple

Postby el_manu » Sat Sep 07, 2013 6:42 am

i think i fixed it...
el_manu
 
Posts: 87
Joined: Mon Aug 19, 2013 8:30 am

Re: Artificial intelligence program..not really just simple

Postby Somelauw » Sat Sep 07, 2013 12:11 pm

el_manu wrote:like if i write

Code: Select all
why is I aM good


it says

Code: Select all
please go on


Do you understand what str.lower() and str.startswith do?

Otherwise, here are some examples that might improve your understanding by reading them or trying them yourself.
Code: Select all
$ python
>>> "why is I aM good"
'why is I aM good'
>>> "why is I aM good".lower()
'why is i am good'
>>> "why is I aM good".lower().startswith("i am")
False
>>> "i am" in "why is I aM good".lower()
True
>>> "why is I aM good".lower().index("i am")
7
Join the #python-forum IRC channel on irc.freenode.net!
Somelauw
 
Posts: 75
Joined: Tue Feb 12, 2013 8:30 pm

Previous

Return to General Coding Help

Who is online

Users browsing this forum: W3C [Linkcheck] and 4 guests