subject

Ou are going to create some mad libs. there are two files available: a word list full of common words ("words. txt"), and a short story ("story. txt"). process both files line-by-line in order to replace the words from the first file in the short story with the string "" (four underscores). then, print the resulting story, each line of the story on its own line.
one issue you may encounter: you cannot loop through a file again after you have read its contents once. solve this issue by storing the words file in a list before processing the story.
in python
words. txt
cat
that
phat
chat
combat
bat
fat
hat
rat
the cat in the hat came back the other day, chasing a bat and a rat.
i asked the cat in the hat why the bat and the rat were his combat.
he said, "that bat and the rat said i was fat! "
the bat and the rat groaned and turned to me.
"we said he was phat! " they said as a plea.
i calmed and spoke kindly to the cat with the hat,
"can't we make this into a nice chat? "
and that was the end of that.
story. txt

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 19:30
Keep your choice of a major there is probably no single correct choice.
Answers: 1
question
Computers and Technology, 23.06.2019 23:40
Which of the following calculates the total from the adjacent cell through the first nonnumeric cell by default, using the sum function in its formula? -average -autosum -counta -max
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
Which of the following terms refers to a collection of different types of software that share the goal of infiltrating a computer and making it do something? a- malware b- virus c- spyware d- trojan horse
Answers: 2
question
Computers and Technology, 24.06.2019 23:30
Adrian has decided to subscribe for a new internet connection. he wants a high speed connection so that he can stream video content smoothly. which access technology would you advise adrian against using?
Answers: 1
You know the right answer?
Ou are going to create some mad libs. there are two files available: a word list full of common wor...
Questions
question
Mathematics, 18.02.2021 20:10
question
Mathematics, 18.02.2021 20:10
question
Mathematics, 18.02.2021 20:10
question
Arts, 18.02.2021 20:10