Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please used in basic python language! thank you Question 2 Write a program to conduct a special task. There is a paragraph, which has been

image text in transcribedplease used in basic python language! thank you

Question 2 Write a program to conduct a special task. There is a paragraph, which has been consolidated word-by-word into a list called word_ls. Your program should join any two adjacent words in order and return something in the expected output below (based on the sample paragraph). Noted that your program should be applicable when the content of the paragraph list changes (i.e., when word_ls changes baesd on the content of a new paragraph, your program should still work). Sample paragraph: "My name is Lance John. I am working at Savings Limited in Germany. Savings Limited accepts mutual funds as investment option. Savings Limited also accepts other investment option." The word list form: word_ls = ['My', 'name', 'is', 'Lance', 'John', 'I', 'am', 'working', 'at', 'Savings', 'Limited', 'in', 'Ger many', 'Savings', 'Limited', 'accepts', 'mutual', 'funds', 'as', 'investment', 'option', 'Savings', 'Limited '; 'also', 'accepts', 'other', 'investment', 'option'] Expected output: ['My name', 'name is', 'is Lance', 'Lance John', 'John I', 'I am', 'am working', 'working at', 'at Savings', 'Savings Limited', 'Limited in', 'in Germany', 'Germany Savings', 'Savings Limited', 'Limited accepts', 'accepts mutual', 'mutual funds', 'funds as', 'as investment', 'investment option', 'option Savings', 'Savings Limited', 'Limited also', 'also accepts', 'accepts other', 'other investment', 'investment option'] *** 1 word_ls = ['My', 'name', 'is', 'Lance', 'John', 'I', 'am', 'working', 'at', 'Savings', 'Limited 2 'in', 'Germany', 'Savings', 'Limited', 'accepts', 'mutual', 'funds', 'as" investment, 3 'option', 'Savings', 'Limited', 'also', 'accepts', 'other', 'investment' 'option'] 4 5 # Start your code below 6

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions