Tip:
Highlight text to annotate it
X
Okay, so here we are in the IDE.
I've made a simple class called Link
that just has a few properties, ID, submitter ID--this was the user--
submitted time--this was the date we were referring to before--
votes, title, and URL.
And then I've got a Python list of these link objects, just a bunch of them.
And the first thing I'd like you to do is before we learn how to use databases,
implement this function query for me.
And what I'd like query function to do is
return the number of votes that the link whose ID is 15 has.
So, all of these links have an ID parameter,
an ID attribute that you can look at,
and I want you to return the number of votes for that particular link.
You need to find it out of this list and then return the number of votes.