Computer Science Canada First Module |
Author: | TheXploder [ Sat Jan 22, 2005 7:02 pm ] |
Post subject: | First Module |
Hey, I just learned how to use modules yesterday so here's my first shot at it. I was making an AI program earlier and I couldn't find any good functions for splitting up words, so now its much easier sice I wrote this. This can be really useful in text based programming. Text based RPG's maybe. I attached an example. |
Author: | TheXploder [ Sat Jan 22, 2005 9:59 pm ] |
Post subject: | |
here is another example it brakes up the all the words and finds how many times the word Macbeth occurs... |
Author: | Tony [ Sat Jan 22, 2005 10:03 pm ] | ||
Post subject: | |||
I like the index function..
|
Author: | TheXploder [ Sat Jan 22, 2005 10:05 pm ] |
Post subject: | |
emm no, it doesn't recognize the word if its iVan, ivaN, iVaN, using index, but my module addition recognize all possible combinations and checks what place it is in the sentence. |