COP 4533 St Petersburg College Python Algorithm Lab Report
Question Description
Chapters 3-5, which is available online and include interactive programing and lectures
http://interactivepython.org/runestone/static/pythonds/index.html
Total Points: 75
(50 pts)
- a. Another example of the parentheses matching problem in your book, comes from hypertext markup language (HTML). In HTML, tags exist in both opening and closing forms and must be balanced tot properly describe a web document. This very simple HTML document:
<html>
<head>
<title>
Example
</title>
</head>
<body>
<h1>Hello, world</h1>
</body>
</html>
Is intended to only show the matching and nesting structure for tags in the language. Write a
program that can check an HTML document for proper opening and closing tags. It should prompt the user for a file path and then read in the html document found at that location. If the html is valid it should display Valid HTML. If not, it should say Invalid HTML, mismatched opening and closing braces. You must use one of the data structures we discussed in CH 3 for this assignment.
b. Design and implement an experiment that will compare the performance of a Python list with a list implemented as a linked list.
c. Write a python program named recursion_max.py. The program should contain a recursive python function that finds the maximum values in a list without using any loops. The main method should test the function.
2. Report (25 pts)
For each program in assignment 2, analyze the time complexity (O(n), O(n^2) . etc) and discuss in your report. Discuss how you arrived at that time complexity and what you could change to improve it. The math for calculating the time complexity of a recursive function can be daunting, so Im really looking for you to make an educated guess here. If you put thought into your answer you will not lose point. However, that doesnt mean just give me an answer such as Its O(n). I need to know why you think its that!
The report should have the following sections:
- Benchmark Analysis (This should contain the timing data from the actual run times in the program, include the measurements for 5 test runs and an average.) including screen captures of the programs output
- Time Complexity Analysis
- Discussion
- All your python source code at the END of the report for reference and turnitin checking, in TEXT format, NOT screen capture.
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."