python programming

Κλειστό Αναρτήθηκε Πριν 6 χρόνια Πληρώθηκε κατά την παράδοση
Κλειστό Πληρώθηκε κατά την παράδοση

We have defined our own markup language HRML. In HRML, each element consists of a starting and ending tag, and there are attributes associated with each tag. Only starting tags can have attributes. We can call an attribute by referencing the tag, followed by a tilde, '~' and the name of the attribute. The tags may also be nested.

The opening tags follow the format:

<tag-name attribute1-name = "value1" attribute2-name = "value2" ... >

The closing tags follow the format:

< /tag-name >

For example:

<tag1 value = "HelloWorld">

<tag2 name = "Name1">

</tag2>

</tag1>

The attributes are referenced as:

tag1~value

[login to view URL]~name

You are given the source code in HRML format consisting of N lines. You have to answer Q queries. Each query asks you to print the value of the attribute specified. Print "Not Found!" if there isn't any such attribute.

Input Format

The first line consists of two space separated integers, N and Q. N specifies the number of lines in the HRML source program. Q specifies the number of queries.

The following N lines consist of either an opening tag with zero or more attributes or a closing tag.

Q queries follow. Each query consists of string that references an attribute in the source program.

Constraints:

1 ≤ N ≤ 20

1 ≤ Q ≤ 20

Each line in the source program contains, at max, 200 characters.

Every reference to the attributes in the Q queries contains at max 200 characters.

All tag names are unique.

Output Format

Print the value of the attribute for each query. Print "Not Found!" without quotes if there is no such attribute in the source program.

Sample Input:

4 3

<tag1 value = "HelloWorld">

<tag2 name = "Name1">

</tag2>

</tag1>

[login to view URL]~name

tag1~name

tag1~value

Sample Output:

Name1

Not Found!

HelloWorld

HTML Python XML

Ταυτότητα Εργασίας: #14482717

Σχετικά με την εργασία

19 προτάσεις Απομακρυσμένη εργασία Ενεργό Πριν 6 χρόνια

19 freelancers κάνουν προσφορές κατά μέσο όρο $38 για αυτή τη δουλειά

schoudhary1553

Greetings sir, i am an expert freelancer for this job and your 100% satisfaction is assured if you allow me to serve. Here is the reason. Why you should pick me? a) I am a very expert and have the same kind of ex Περισσότερα

$100 USD σε 2 μέρες
(148 Αξιολογήσεις)
7.3
pkbsdmp

I am a python developer having 6 + experience in IT industry. Relevant Skills and Experience I am expert in: Python XML Parsing, JSON Parsing, web services and Regular Expressions Proposed Milestones $25 USD - NA

$25 USD σε 1 μέρα
(102 Αξιολογήσεις)
6.6
anupkelkar02

I am expert in python for Web scraping , API integration , Odoo ERP customization and lexical analysis. Relevant Skills and Experience Also a good hand in web application designing using django and flask. I am a Oracl Περισσότερα

$25 USD σε 1 μέρα
(48 Αξιολογήσεις)
6.0
algispetkuns

can do it in next 3 hours Relevant Skills and Experience - python - text processing Proposed Milestones $40 USD - complete program

$40 USD σε 1 μέρα
(42 Αξιολογήσεις)
6.0
Webln

Hello! my name is Viktor. We are IT Company «Webin». We provide website design and web and app development services for organizations, public and government institutions, company or private web-pages. We got acquainte Περισσότερα

$34 USD σε 2 μέρες
(19 Αξιολογήσεις)
5.6
abhi742

A proposal has not yet been provided

$25 USD σε 0 μέρες
(17 Αξιολογήσεις)
4.1
brunogarcianet

I use Python in University, where I study and work. What you need is very simple, and it can be done in a few hours from now. If you hire me now I will do it at this moment, otherwise you will have to wait for me to Περισσότερα

$10 USD σε 1 μέρα
(4 Αξιολογήσεις)
3.4
Ahsannazir1

Dear sir/madam I am an undergraduate in computer science having 3 years of experience. My expertise are specially in c,c++,c#, JAVA, Python and android. I can help you with your project and will deliver you quality wor Περισσότερα

$20 USD σε 3 μέρες
(3 Αξιολογήσεις)
2.5
wbremer

The bid is for the project as described in the project posting. Relevant Skills and Experience 20 years SW Engineering / Development experience in various languages. Proposed Milestones $30 USD - Delivery of the fina Περισσότερα

$30 USD σε 2 μέρες
(1 Κριτική)
2.7
ioriirobertino

Python script. Input: numer_of_lines + number_queries. Output: Queries results. If not attribute, Not Found!. Relevant Skills and Experience 7 years working in linux enviroments. Deep understanding on developing scrip Περισσότερα

$25 USD σε 1 μέρα
(0 Αξιολογήσεις)
0.0
n1amr

A proposal has not yet been provided

$25 USD σε 2 μέρες
(0 Αξιολογήσεις)
0.0
PhilipTPP

Your project seemed too interesting for me to skip. I was looking for a similar reporting structure to implement at my work myself. Your idea intrigues me. I have written a quick script to test your theory already and Περισσότερα

$15 USD σε 1 μέρα
(0 Αξιολογήσεις)
0.0