Answered step by step
Verified Expert Solution
Question
1 Approved Answer
IN PYTHON, Write a function, addTag(s, tag) that takes a string, s, and another string, tag, and returns a new string the surrounds the string
IN PYTHON, Write a function, addTag(s, tag) that takes a string, s, and another string, tag, and returns a new string the surrounds the string s with an html style tag. An HTML tag consists of a left angle bracket, the tag, and the right angle bracket. HTML tags come in pairs and the second one has a "/" before the tag. Study the following examples to see how it should work: addTags("Hello", "pre") should return the string '
Hello
' addTags("Some more text", "bold") should return the string 'Some more text'
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started