Question: Please Help me solve this question. It has to be done in Python Language. Please Don't use advanced python and solve it using basic python

Please Help me solve this question. It has to be done in Python Language. Please Don't use advanced python and solve it using basic python like functions, lists, tuples, dictionaries, strings, etc.Please Help me solve this question. It has to be done in

Question 8. (A simplified page rank system.) Given a text file (pages.txt) which has lines of the form: URLnn, init_importance: text containing some URLnn. Each line represents a page with the first URLnn being its URL and init_importance is a number between 0 and 1.0, which gives the initial importance of this page. The URLnn in the rest of the line refers to the URL links to other pages that this page contains. (To simplify, instead of giving a full path, we are using URLnn, and instead of having separate files for each page, we are giving the text of a page as a line in the file). Example: URL00, 0.5: This is page zero, and has references to URL01, URL09, and also to URL08. It may have repeated references - so there are two references to URL09. URL02, 0.6: This is another page (page is represented as a line in this). This has reference to URL05, URL04, and URL00 Pages are ranked according to their overall importance. Let the total number of unique links in a page i be links[i] (i.e. these many unique pages this page refers to). The overall importance of a page i is sum over all the pages (j) which have a link to page i of: init_importance[j]/ links[j] (i.e. all the pages to which the page j has a link are distributed the importance of this page equally) Your program has to find the highest ranking N pages ( N can be set in a variable or taken as input) for a given input file. It seems natural to create a dictionary with page URL as the index, and having its init_importance, overall importance, the set of URLs it accesses, etc in it. Note. This simplified version has only one round of computation for the overall importance from the initi_importance. The ranking algorithm actually takes the current importance (starting with

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!