Write a Python program that works as a text manipulation tool. The paragraph of text that it will manipulate is: "Python is a high-level, general-purpose programming language. It was created by Guido van Rossum and first released in 1991. Python's design philosophy emphasizes code readability with its notable use of significant indentation. Its language constructs and object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects." Perform the following tasks on this paragraph: Split the paragraph into a list of sentences. Hint: You can use the '. ' as the delimiter but when you do that, it will delete the periods. You must go back in and use a for loop to add a period back to the end of each sentence except for the last one. Print the list. Print only the first and last sentence from the list. Convert the first and last sentences to all uppercase and then print them. Join the sentences from step c back into a paragraph. Print this final paragraph. Using string slicing, print only the first 20 characters of the final paragraph. Count how many times the word 'code' appears in the final paragraph and print this count. Find the index of the first occurrence of the word 'Python' (case sensitive) in the final paragraph and print this index. Replace all occurrences of 'Python' (case sensitive) in the paragraph with 'PY'. Print the final paragraph. For the last sentence in the paragraph, split the sentence into words, reverse the order of the words, and then join them back together into a sentence. Print this reversed sentence. When your program runs, it should match the expected output below exactly. Go back in and put in labels and line breaks as needed. Im having trouble getiing the sentances to split with a period at the end.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter3: Understanding Structure
Section: Chapter Questions
Problem 18RQ
icon
Related questions
Question
  1. Write a Python program that works as a text manipulation tool. The paragraph of text that it will manipulate is:

"Python is a high-level, general-purpose programming language. It was created by Guido van Rossum and first released in 1991. Python's design philosophy emphasizes code readability with its notable use of significant indentation. Its language constructs and object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects."

  1. Perform the following tasks on this paragraph:
  1. Split the paragraph into a list of sentences.
  1. Hint: You can use the '. ' as the delimiter but when you do that, it will delete the periods. You must go back in and use a for loop to add a period back to the end of each sentence except for the last one.
  1. Print the list.
  2. Print only the first and last sentence from the list.
  3. Convert the first and last sentences to all uppercase and then print them.
  4. Join the sentences from step c back into a paragraph.
  5. Print this final paragraph.
  6. Using string slicing, print only the first 20 characters of the final paragraph.
  7. Count how many times the word 'code' appears in the final paragraph and print this count.
  8. Find the index of the first occurrence of the word 'Python' (case sensitive) in the final paragraph and print this index.
  9. Replace all occurrences of 'Python' (case sensitive) in the paragraph with 'PY'. Print the final paragraph.
  10. For the last sentence in the paragraph, split the sentence into words, reverse the order of the words, and then join them back together into a sentence. Print this reversed sentence.
  1. When your program runs, it should match the expected output below exactly. Go back in and put in labels and line breaks as needed.
  2. Im having trouble getiing the sentances to split with a period at the end.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Top down approach design
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage