The program will prompt the user to enter the file names for a source input file and an output file along with two strings, one to be found in the source file and a string that will replace each occurrence of that string in the file. source file: this is the text file that your program will read and search for the target string to be replaced output file: this is the file that will contain the source file after all of the occurrences of the target string have been found and replaced by the replacement string target string: this is the string your program will search for in the source file to locate all occurrences of the string replacement string: this is the string that will replace each occurrence of the target string in the source file I cant use the replace method, count method, split method, range() function, or lists in my solution is there any other method to use to get this.
The program will prompt the user to enter the file names for a source input file and an output file along with two strings, one to be found in the source file and a string that will replace each occurrence of that string in the file. source file: this is the text file that your program will read and search for the target string to be replaced output file: this is the file that will contain the source file after all of the occurrences of the target string have been found and replaced by the replacement string target string: this is the string your program will search for in the source file to locate all occurrences of the string replacement string: this is the string that will replace each occurrence of the target string in the source file I cant use the replace method, count method, split method, range() function, or lists in my solution is there any other method to use to get this.
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter7: User-defined Simple Data Types, Namespaces, And The String Type
Section: Chapter Questions
Problem 10SA
Related questions
Question
The program will prompt the user to enter the file names for a source input file and an output file along with two strings, one to be found in the source file and a string that will replace each occurrence of that string in the file.
source file: this is the text file that your program will read and search for the target string to be replaced
output file: this is the file that will contain the source file after all of the occurrences of the target string have been found and replaced by the replacement string
target string: this is the string your program will search for in the source file to locate all occurrences of the string
replacement string: this is the string that will replace each occurrence of the target string in the source file
I cant use the replace method, count method, split method, range() function, or lists in my solution is there any other method to use to get this.
![( back to classroom
run
main.py
inFile.py
Find and Replace
written by:
Description:
< Insert comments here about what this program does. >
- Algorithm:
< Insert comments listing the steps of your algorithm to
solve this problem.
fileone = input ("Enter the input file name :")
fileTwo = input ("Enter the output file name :")
targetstring = ìnput("Enter the target string :")
replacementString = input("Enter the replacement string :")](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F4f42f551-c25c-4833-95e8-1bc82c7d6458%2F06fe9da6-5e3b-4766-a829-5e852f6bc1b3%2Fm21hvud_processed.png&w=3840&q=75)
Transcribed Image Text:( back to classroom
run
main.py
inFile.py
Find and Replace
written by:
Description:
< Insert comments here about what this program does. >
- Algorithm:
< Insert comments listing the steps of your algorithm to
solve this problem.
fileone = input ("Enter the input file name :")
fileTwo = input ("Enter the output file name :")
targetstring = ìnput("Enter the target string :")
replacementString = input("Enter the replacement string :")
![main.py
inFile.py
Overview
wear masks with two or more layers to stop the spread of COVID-19
wear the mask over your nose and mouth and secure it under your chin
masks should be worn by people two years and older
masks should NOT be worn by children younger than two, people who have trouble
breathing, or people who cannot remove the mask without assistance
do NOT wear masks intended for healthcare workers, for example, N95 respirators
CDC does not recommend the use of face shields alone. Evaluation of face shields
is ongoing but effectiveness is unknown at this time.
evaluation of mask and gaiter materials and structure is ongoing.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F4f42f551-c25c-4833-95e8-1bc82c7d6458%2F06fe9da6-5e3b-4766-a829-5e852f6bc1b3%2F7adknnp_processed.png&w=3840&q=75)
Transcribed Image Text:main.py
inFile.py
Overview
wear masks with two or more layers to stop the spread of COVID-19
wear the mask over your nose and mouth and secure it under your chin
masks should be worn by people two years and older
masks should NOT be worn by children younger than two, people who have trouble
breathing, or people who cannot remove the mask without assistance
do NOT wear masks intended for healthcare workers, for example, N95 respirators
CDC does not recommend the use of face shields alone. Evaluation of face shields
is ongoing but effectiveness is unknown at this time.
evaluation of mask and gaiter materials and structure is ongoing.
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 4 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
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.Recommended textbooks for you
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning