I have completed the iterative pagerank in the ai50 course and have a doubt. The example in cs50 for the iterative pagerank is different from mine by about 0.0004. If I have to fix this how do I fix this before submitting it.

Also, my iterative pagerank doesn't add up to 1, but it is very close. Also, if I have to fix this then how do I fix it without changing the ranks.

Here is my code if you need it https://gist.github.com/Amruth-Arunkumar/de763a3c2c336a9742635788225da26e


As stated in the specifications of the problem :

The iterate_pagerank function should accept a corpus of web pages and a damping
factor, calculate PageRanks based on the iteration formula described above, 
and return each page’s PageRank accurate to within 0.001.

If it adds up to 1.0001 don't worry that's just a rounding issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .