Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

In Python Write a program to read a file with html "helpers" and produce html output in a new file. Output any input errors at the bottom of your file. It will have to be prepared for whatever is in t

In Python

Write a program to read a file with html "helpers" and produce html output in a new file.

Output any input errors at the bottom of your file.

It will have to be prepared for whatever is in the file.

Here are the "helpers" that have to be handled:

  • h1, h2, h3, h4, h5 (headings)
  • p (paragraph)
  • b (bold text)
  • ol (ordered list)
  • ul (unordered list)

syntax:

  • for headings: h1(heading 1), etc
  • for paragraphs: p(Line one)
  • for bold text: b(text bold)
  • for lists: ul(item 1,item 2,item 3) (similar for ol)

output:

  • headings: < h1 >heading< /h1 > (and 2,3,4,5)
  • paragraph: < p >Line one< /p >
  • bold: < b >text bold< /b >
  • lists: < ul > < li >item 1< /li > < li >item 2< /li > < li >item 3< /l i> < /ul > (ol similar)

input: 

H1(This is a possible input file for the final exam) 

H3(Part One) 

P(The following is an unordered list:) 

UL(one two,three four five,six) 

P(This is an ordered list:) 

OL(six,three four five,one two) 

B(Important! This is only an example) 

output: 

< h1 >This is a possible input file for the final exam< /h1 >

< h3 >Part One h3 > 

< p >The following is an unordered list:< /p >

< ul >< li >one two< /li >< li >three four five< /li >< li >six< /li >< /ul > 

< p >This is an ordered list< /p> 

< ol >< li >six< /li >< li >three four five< /li >< li >one two< /li >< /ol >

< b >Important! This is only an example< /b >

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question