1. (10 points) Using string method find, extract the Video link from the following HTML code
for embedding videos on a web page. Your code should work for any embedded code of this
format.
<embed
src="http://www.youtube.com/v/Xp2uzv9uSn8?version=3&feature=pl
ayer_detailpage" type="application/x-shockwave-flash"
allowfullscreen="true" allowScriptAccess="always" width="640"
height="360">
2. (10 points) In the Disney cartoon adaptation of Lewis Carroll's "Alice's Adventures in
Wonderland," the Dormouse modifies a well known poem by substituting words. Define a
function dormouse that takes two arguments- a string representing a poem and a nested
sequence representing a dictionary. The function prints the poem that is generated from
replacing all words in the poem that appear in the dictionary with their translation. E.g.
poem = “twinkle twinkle little star how I wonder what you are”
dict = [(twinkle,twitter),(star,bat),(how,manner-inwhich),(
wonder,speculate)]
>>> dormouse(poem,dict)
twitter twitter little bat manner-in-which I speculate what you
are
poem = “humpty dumpty sat on a wall humpty dumpty had a great fall”
dict = [(humpty dumpty, the egg),(sat,rested-on-its
behind),(wall,bar),(great,gigantic),(fall,depreciation)]
>>>dormouse(poem,dict)
the egg rested-on-its-behind on a bar the egg had a gigantic
depreciation
3. (20 points) Write a function encrypt(msg) that takes any string, encrypts it using the “Route-
Rail Fence Cipher” and prints the encrypted string. The following link will be useful:

can anyone help me solve his

This sounds like school help. :(

Show us what you have so far. Help will come to those who work for it.

- WolfShield

Your first question is quite simple one....... just search for the string src using string.find('src')... it will provide the starting point of the string....now move that pointer until you find the com.... its quite simple...

if you were just started studying then try Head first python... very good book for beginners.. and you can complete that book within 5, 6 days......try that

You should start a new thread with one of the questions only, and the code that you have tried. For example, where is the data coming from in the first question? If from a file, then the file has to be read.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.