Question: Python 3 def insert_tag(input_filename, output_filename, tag, target_word): pass if __name__ == '__main__' : print( Testing Part II ) print( Reminder: please compare your output file

Python 3

Python 3 def insert_tag(input_filename, output_filename, tag, target_word): pass if __name__ == '__main__':

print("Testing Part II") print("Reminder: please compare your output file with the 'expectedX.html'files provided for you.") print("Testing insert_tag() with input_filename = 'sample1.html', output_filename =

'modified1.html', " + "tag = 'i', target_word = 'Python'") insert_tag('sample1.html', 'modified1.html', 'i',

def insert_tag(input_filename, output_filename, tag, target_word): pass 
if __name__ == '__main__': 
print("Testing Part II") 
print("Reminder: please compare your output file with the 'expectedX.html' files provided for you.") print("Testing insert_tag() with input_filename = 'sample1.html', output_filename = 'modified1.html', "  + "tag = 'i', target_word = 'Python'") insert_tag('sample1.html', 'modified1.html', 'i', 'Python') print("Testing insert_tag() with input_filename = 'sample2.html', output_filename = 'modified2.html', "  + "tag = 'b', target_word = 'buffalo'") insert_tag('sample2.html', 'modified2.html', 'b', 'buffalo') print("Testing insert_tag() with input_filename = 'sample3.html', output_filename = 'modified3.html', "  + "tag = 'u', target_word = 'Stony'") insert_tag('sample3.html', 'modified3.html', 'u', 'Stony') print() 

Part Il: HTML Stylizer (20 points) Write a function insert.tag) that takes the following arguments, in this order: 1. input.filename: the name of an HTML file the function will process 2. output.filename: the name of an output file that will contain processed HTMLcode 3. tag: an HTML tag that will be used to stylize particular words in the original file 4. target.word: the targeted word that the function finds and stylizes using the tag You don't actually need to know HTML to solve this problem. Here's an example of what the function is supposed to do. Say this the content in your original HTML file:

I Like Python

p>I love Python, because Python is awesome! I love Python yay! p>This paragraph should remain unchanged. /body>

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!