So basically, or teacher gave us a task to do a few weeks ago on visual basic. However, we habe now moved on to our coursework and have forgotten about our task. But the task is still bugging me and i would like if someone wrote it amd explained it. No one in the class has complete it.
Develop a program that identifies individual words in a sentence, stores these in a list and replaces each word in the original sentence with the position of that word in the list.
For example, the sentence:
Ask not whay your country can do for you ask what you can do for your country
Contains the words: ask, not, whay, your, country, can, do, for, ypu
The sentence can be recreated from the positions of these words in this list using the sequence 1,2,3,4,5,6,7,8,9,1,3,9,6,7,8,4, 5
Save the list of words and the positions of these words in the sentence as seperate files or as a single file.
Identify the individual words in a sentence and store them in a list
Create a list of positions for words in that list
Save these lists as a single file or as separate file
Thanks in advance to whoever can solve this task
Help computer science
|Why bother with a post grad course - waste of time?||17-10-2016|
|REMINDER: Do not post your personal statement on TSR, otherwise you may have to rewrite it from scratch. Click here for more info.||11-10-2016|