Function Name: filterUW Inputs: . A string containing imagined text scraped from
ID: 3889540 • Letter: F
Question
Function Name: filterUW Inputs: . A string containing imagined text scraped from an online discussion board Return Value: a filtered version of the input string Description: The CU football team is playing its first conference opponent this weekend (the University of Washington), and students at both schools are starting to get a little bit testy online. In particular, a number of words having to do with the Buffs' opponents have been drafted into use as "slurs" on campus discussion boards (think: reddit), and since you're collecting this data as part of a class project, you feel like it would be most appropriate to replace these emergent vulgarities with asterisks (") so that your project readers won't be offended. Write a function that takes in a string containing text scraped from the online bulletin board. Your job is to find and replace any instances of the following words... . Husky Huskies UW . Washington in the input with a corresponding number of asterisks. For example, you would replace all instances of "Husky" in the input string with "Explanation / Answer
Thank you for taking services from us.As I do not get any language specification in the problem i take python as my choice.this is the function you are looking for.
this python function does follows :
1.it open the file in
change the file directory as your need
2.read the file into a buffer called filedata
3.replace the regarding occurrences of the string with *
4. then write into the file
hope this help you
thanks
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.