Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

HTML Files Hypertext Markup Language is the basic language used for web pages. It is just a text file, so we can use python to

HTML Files Hypertext Markup Language is the basic language used for web pages. It is just a text file, so we can use python to read an html. The markup in html uses tags for sections and formatting. Tags have an opening and a closing tag. For instance, in the tag, there is normally a title tag that gives the title of the web page. Example A sample web page

This is a paragraph in the body.

The indentation in the above section is only for readability. There may not be any indentation. The important part. Headers The header tag in html indicates the head of a section, and has formatting to make it stand out before its section.

is the highest level, with lower tags

,

,

etc.

My Heading

Big section of information

Smaller sub heading

Big section of information

Another heading

Big section of information

Notice that the

section starts with

and the end is marked with

. Youll want open the html files as a text file and be able to read through them. Output Our program is going to read through the headers and output the headers in a new output file as a bullet point file. The output for the example above would be * My Heading * Smaller sub heading * Another Heading Your program will need to output, extra spaces or tabs to indent the values in the output file. Requirements Ask user for a valid input file. Must respond to File Not Found Error appropriately. Ask user for file to output to. Must respond to IO Errors appropriately. Read through input html file for any header tags and export the result as unordered lists to the output file. Example

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Business Process Driven Database Design With Oracle PL SQL

Authors: Rajeev Kaula

1st Edition

1795532386, 978-1795532389

More Books

Students also viewed these Databases questions

Question

What is operatiing system?

Answered: 1 week ago

Question

6. Be able to choose and prepare a training site.

Answered: 1 week ago