• Keine Ergebnisse gefunden

Problem1(3Points) Problem2(3Points) PythonForFineProgrammers Problem3(4Points) Problem4(6Points)

N/A
N/A
Protected

Academic year: 2021

Aktie "Problem1(3Points) Problem2(3Points) PythonForFineProgrammers Problem3(4Points) Problem4(6Points)"

Copied!
1
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Technische Universität München Fakultät für Informatik

Lehrstuhl für Effiziente Algorithmen Sandeep Sadanandan

Sommer Semester 2009 Problem Sheet 1 Jun 5, 2009

Python For Fine Programmers

Deadline: June 18, 2009

Problem 1 (3 Points)

Write a python function/program which accepts a URL as a parameter and returns the handler to that URL as output.

Useurllib2.

The program should be accessible from command line.

Problem 2 (3 Points)

Write a python function which given a regular expression and a URL, returns a list of matches of the RE in the page pointed to by the URL.

Use the function from previous problem.

Problem 3 (4 Points)

Implement depth first search for directed graphs. The code forclass Graphis pro- vided along with the exercise.

Problem 4 (6 Points)

Write a program to combine the above exercises.

The program accepts a command line argument, a valid URL. On accepting the URL, the program creates a Graph with the given URL as a node.

The program finds out all the occurrences of other URLs in the given URL and adds them as new nodes to the Graph, and as neighbors to the node corresponding to the URL which contained them.

And recursively does the same for every node.

The program should be capable of having a control over the limit of recursion. A default limit could be 3.

Referenzen

ÄHNLICHE DOKUMENTE

If population growth falls but investment rates remain high the capital output rate would increase and the return to investment would fall.. The lower return

2 Through this activity, ,-unsaturated carbonyl compounds trigger the activation or inhibition of anti- and proinflammatory pathways, where reactive sulfhydryl groups of

Whilst those with whose beliefs and practices I am concerned here routinely interact with Islamic 'specialists' of one kind or another - whether in the form of the maulwis who

The Z00 3 system presented in this paper is a metasystem which serves two purposes: It is both an instrument for inspecting the contents of an object-oriented

A recent article [1] presents an analysis of a one-person game which consists of a square board divided into 25 smaller squares, each containing a light bulb attached to a button,

My early fascination with computers would ultimately place Corporate Systems Center (CSC) at the forefront of magnetic data storage technology. Noble to head a

To insert a GoTo button to turn to a different document, select the document in the Table of Contents, and draw the gesture for a GoTo button <ID in the cork margin. To have

initialization is easily programmed by the user as procedure, no initialization part is provided. The Univac linker allows 12 character alphanumeric symbolic