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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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.
### 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. >

```python
fileOne = input("Enter the input file name :")
fileTwo = input("Enter the output file name :")
targetString = input("Enter the target string :")
replacementString = input("Enter the replacement string :")
```

This Python script outlines the basic structure for a "Find and Replace" program. The program prompts the user to input:

1. **Input file name:** The file where the target text is to be found.
2. **Output file name:** The file where the modified text will be saved.
3. **Target string:** The text to be searched and replaced in the input file.
4. **Replacement string:** The text that will replace the target string. 

The script currently serves as a template for further development, requiring additional code to execute the find and replace operation within the specified files.
Transcribed Image Text:### 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. > ```python fileOne = input("Enter the input file name :") fileTwo = input("Enter the output file name :") targetString = input("Enter the target string :") replacementString = input("Enter the replacement string :") ``` This Python script outlines the basic structure for a "Find and Replace" program. The program prompts the user to input: 1. **Input file name:** The file where the target text is to be found. 2. **Output file name:** The file where the modified text will be saved. 3. **Target string:** The text to be searched and replaced in the input file. 4. **Replacement string:** The text that will replace the target string. The script currently serves as a template for further development, requiring additional code to execute the find and replace operation within the specified files.
**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:**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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education