Question: it is python 3 class. please show me the screen shot of the code and paste the code. Thank you Problem B: Word Repetition (10

it is python 3 class. please show me the screen shot of the code and paste the code. Thank you

it is python 3 class. please show me the screen shot of

Problem B: Word Repetition (10 point) Searching data for repetitions is a common task in computer science. In this problem, you will write a Python program to do a simple repetition task: given a long sentence string consisting of words separated by a single space, print out each word, in order of first appearance, along with the locations that word appears in the sentence. This is best explained by an example. Consider the string "Computer science is computer science". The first word is "computer" and it appears in the position 0 and in the position 3. "science" appears in positions 1 and 4. "the" appears only in position 2 Sample run of the program: Enter a sentence: Computer science is computer science computer 0 3 science 1 4 is 2 Do you want to enter another sentence (Y/N)? N Constraints and comments: . You can assume the sentence consists of words without any punctuation, with consecutive words separated by a space Do not distinguish between upper and lower case Include a continuation look; keep prompting the user until they choose to quit out of the program . You are welcome to use any of the Python string and list functions. Hint: use split to split a sentence into a list of individual words

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!