![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 01.12.2020 02:50 JadedylaneH3115
Ok so im going to list my question and then the work so far.
Here is the code so far:(THE PROBLEM WITH THE CODE IS THAT THE IM SUPPOSE TO USE FIND() TO REPEATEDLY CHANGE THE OCCURRENCE OF THE WORD "MASK" TO THE WORD "HAT" IN THE FILE BUT AM KIND OF LOST HAVE BEEN WORKING ON THIS FOR A WEEK AND A HALF) ALSO I CAN NOT use the replace method, count method, split method, range() function, or lists in your solution. HAVE BEEN TRYING TO FIND SUM WAY TO USE FIND() BUT AM COMING UP SHORT
CODE:
#Get input file name
fileOne = input("Enter the input file name :")
#Get output file name
fileTwo = input("Enter the output file name :")
'''Get a string that will be searched in the source file
to locate all occurrences of the string'''
targetString = input("Enter the target string :")
'''Get a string that will replace each occurrence of the target
string in the source file'''
replacementString = input("Enter the replacement string :")
files =input("Enter a file with the word 'mask':")
#Open the input file in read mode
f1 = open(fileOne,"r+")
#Read the content of input file
content =f1.read()
#Replace the target string with the replacement string
content =f1.find('mask')
print(files[0:content]+ "hat"+ files[content +content:len(files)])
#Open the output file in write mode
f1 = open(fileTwo,"w")
'''Write the content after all of the occurrences of the target
string have been found and replaced by the replacement string'''
f1.close()
![ansver](/tpl/images/cats/User.png)
Answers: 1
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 18:30
Technician a says that a shop towel should never be used to clean around the flange area before replacing an automatic transmission filter. technician b says that a dimpled transmission fluid pan can be repaired. who is right
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 01:30
Negative methods of behavior correction include all but this: sarcasm verbal abuse setting an example for proper behavior humiliation
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 20:30
Column a of irmaβs spreadsheet contains titles for each row, but her document is too big and will be printed three pages across. she wants to be sure that every page will be understood. what can irma do to with this problem?
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 20:50
3.11.3 quiz: comparing and analyzing function typesquestion 4 of 102 pointswhat can you say about the y-values of the two functions f(x) = 3x2-3 andg(x)=2* - 3?
Answers: 2
You know the right answer?
Ok so im going to list my question and then the work so far.
Here is the code so far:(THE PROBLEM W...
Questions
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 10.03.2021 14:00
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/istoriya.png)
History, 10.03.2021 14:00
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/User.png)
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 10.03.2021 14:00
![question](/tpl/images/cats/mat.png)
Mathematics, 10.03.2021 14:00
![question](/tpl/images/cats/mat.png)
Mathematics, 10.03.2021 14:00
![question](/tpl/images/cats/mat.png)
Mathematics, 10.03.2021 14:00
![question](/tpl/images/cats/en.png)
English, 10.03.2021 14:00
![question](/tpl/images/cats/mat.png)
Mathematics, 10.03.2021 14:00
![question](/tpl/images/cats/mat.png)
Mathematics, 10.03.2021 14:00
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 10.03.2021 14:00
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/health.png)
![question](/tpl/images/cats/himiya.png)
Chemistry, 10.03.2021 14:00