[closed] hw4.7 url doesn't exist case for record_user_clicks()

Hi there,

Do we need to anything extra for the following case:

record_user_click(index, 'is', 'http://www.udacity.com/cs101x/crawling.html')

..Where the url doesn't exist?

My record_user_click() procedure currently doesn't do anything with it so when i do a lookup;

record_user_click(index, 'is', 'http://www.udacity.com/cs101x/crawling.html')
print lookup(index, 'is')
[['http://www.udacity.com/cs101x/index.html', 0]]

Thank you.

asked 19 Mar '12, 02:27

Haani%20Niyaz's gravatar image

Haani Niyaz
3751929
accept rate: 22%

closed 20 Mar '12, 22:19

The question has been closed for the following reason "The question is answered, right answer was accepted" by Haani Niyaz 20 Mar '12, 22:19


One Answer:

that output has sense to me, because you only update the index when you find a coincidence, not like this case.

link

answered 19 Mar '12, 02:54

Oscar%20Morera's gravatar image

Oscar Morera
307211

Thanks mate.

(20 Mar '12, 22:19) Haani Niyaz Haani%20Niyaz's gravatar image

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×15,331
×60
×4

Asked: 19 Mar '12, 02:27

Seen: 179 times

Last updated: 20 Mar '12, 22:19