[Solved]Write Code Acts Based Following Steps Step 1 Asks User Enter Main String Step 2 Ask User E Q37229069
Python
Write a code that acts based on the following steps: Step 1: Asks the user to enter the main string Step 2: Ask the user to enter a smaller string which needs to be found in the main string Step 3: Search for the second string in the main string. If it was not found, display a proper message that the string was not found. Step 4: If the string was found, display a part of the main string which includes the second string plus 5 characters before and after its occurrence. For example, if the main string is “The quick brown fox jumps over the lazy dog.” and the second string is fox”, the code should display rown fox jump rown” and “jump” are each 4 characters and including the space after “rown” and before “jump” the code is displaying the second string “fox” plus 5 characters before it and 5 characters after it. (Ctrl) ▼ Show transcribed image text Write a code that acts based on the following steps: Step 1: Asks the user to enter the main string Step 2: Ask the user to enter a smaller string which needs to be found in the main string Step 3: Search for the second string in the main string. If it was not found, display a proper message that the string was not found. Step 4: If the string was found, display a part of the main string which includes the second string plus 5 characters before and after its occurrence. For example, if the main string is “The quick brown fox jumps over the lazy dog.” and the second string is fox”, the code should display rown fox jump rown” and “jump” are each 4 characters and including the space after “rown” and before “jump” the code is displaying the second string “fox” plus 5 characters before it and 5 characters after it. (Ctrl) ▼
Expert Answer
Answer to Write a code that acts based on the following steps: Step 1: Asks the user to enter the main string Step 2: Ask the user… . . .
OR

