Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

manipulating strings Figure 2.11 Grading Complete each task listed below. Each task contains automated checks which are used to calculate your grade. When you have

manipulating strings
image text in transcribed
image text in transcribed
image text in transcribed
Figure 2.11 Grading Complete each task listed below. Each task contains automated checks which are used to calculate your grade. When you have completed each task by clicking the checkbox, open the task list panel on the left navigation bar and click the "Submit" button. Task Following the instructions. count and display the number Manipulating Strings substring im otrei wurus. Steps for Completion 1. Go to your main py file. 2. Take in the user input for the sentence and the substring. 3. Next, sanitize and format the input by removing the whilespace and converting it to lowercase. 4. Count the occurrences of the substring. 5. Print the results. 6. Run the script by using the python 3 main.py command The output should look like Figure 2.11 shown below: Aim Write a script that counts and displays the number of occurrences of a specified word in a given excerpt. The script should request two input values from the user, that is, the excerpt and the word to seareh for. You can assume that the word will not occur as a substring in other words

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

Students also viewed these Databases questions