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
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 32SA
icon
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 :")
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.
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
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Knowledge Booster
File Input and Output Operations
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…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning